Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp435903ybb; Wed, 1 Apr 2020 03:02:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuDphr8FwTeKPe1AmqN8leg66rEcNB6pz5gcfjTdEA6q53f+S8UI1BOOdHT3P4OtJUEBL8H X-Received: by 2002:a05:6830:3090:: with SMTP id f16mr15656442ots.211.1585735331910; Wed, 01 Apr 2020 03:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585735331; cv=none; d=google.com; s=arc-20160816; b=N9qxrjnK4cHqXIGrVI04iljX6aNbcfnni/kTu655PMXt7zsFjjNpwhyDARNKx2CVkR yPm54rC7kDYukCv0P8wFaZbUUoZJaGQMACb12zFboOPRrM10wjVVN9M5SLQRWveBARCQ 8NbN27JxJwvS/A5+An0r/JUYGvy+5GQ9guuBx8jXE49jCPBRP78Eai7BT5gVgiKNoR8h AyEnoUUCsnhxTEGSIy6FsHHAQgAtz3POfau0OeijnwPwrL6qc+WGn48NyHw/NJBv4huz G7hfiBEfZUB0IhyJqDZE/8We/uDmUmju9fVkbtND67c6mhvWAVpTLSPN7OGUXfA2ABmc WJlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2xm7rN/xutmtjMphpsOXlDplT8gJvY+Wt15mYN3Za74=; b=heV8qejSOyEWqRexvyxDS/HtRzng/nrggOj50Hcg/I6JlrTl4OS9Mj8tPo2Xtakl3I ibHlpPT3Pc8e3MLw2u6Elfv/WdH/+REcqW787VEjPsZTE0TZDZqYokn1ehQ4E+caW/Kf p1DJkLEzFly1bWEvQ6QhdIgO5bdveKMfDF3AeUSwsPPxwNXcqr7AiFo44AetPBRa1aXJ BiP5LjmrIykvvCu7NhOEsEiR5YMRX1eUhtKmT+S0m7ZG2fkpqDuGof/2hjEQx7uqcAqR PwFCOzUIYA6l9ZYEt3XK0oanECSbwKq8nOEy0dIti9Wa/CHmID9uazVQ8avaZ5+XEDSw Unag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si589645ood.66.2020.04.01.03.01.58; Wed, 01 Apr 2020 03:02:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbgDAKBc (ORCPT + 99 others); Wed, 1 Apr 2020 06:01:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:33628 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgDAKBc (ORCPT ); Wed, 1 Apr 2020 06:01:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2E5DCAE2D; Wed, 1 Apr 2020 10:01:30 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id DC2F31E11F4; Wed, 1 Apr 2020 12:01:25 +0200 (CEST) Date: Wed, 1 Apr 2020 12:01:25 +0200 From: Jan Kara To: Jules Irenge Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, Alexander Viro , Dan Williams , Matthew Wilcox , Jan Kara , "open list:FILESYSTEMS (VFS and infrastructure)" , "open list:FILESYSTEM DIRECT ACCESS (DAX)" Subject: Re: [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() Message-ID: <20200401100125.GB19466@quack2.suse.cz> References: <0/7> <20200331204643.11262-1-jbi.octave@gmail.com> <20200331204643.11262-4-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331204643.11262-4-jbi.octave@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 31-03-20 21:46:39, Jules Irenge wrote: > Sparse reports a warning at wait_entry_unlocked() > > warning: context imbalance in wait_entry_unlocked() > - unexpected unlock > > The root cause is the missing annotation at wait_entry_unlocked() > Add the missing __releases(xa) annotation. > > Signed-off-by: Jules Irenge > --- > fs/dax.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/dax.c b/fs/dax.c > index 1f1f0201cad1..adcd2a57fbad 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -244,6 +244,7 @@ static void *get_unlocked_entry(struct xa_state *xas, unsigned int order) > * After we call xas_unlock_irq(), we cannot touch xas->xa. > */ > static void wait_entry_unlocked(struct xa_state *xas, void *entry) > + __releases(xa) Thanks for the patch but is this a proper sparse annotation? I'd rather expect something like __releases(xas->xa->xa_lock) here... Honza > { > struct wait_exceptional_entry_queue ewait; > wait_queue_head_t *wq; > -- > 2.24.1 > -- Jan Kara SUSE Labs, CR