Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp758987ybb; Wed, 1 Apr 2020 09:06:35 -0700 (PDT) X-Google-Smtp-Source: APiQypKpd+v6CY+lHVA//PVge3RchZmQ0cIkM0qbkZ2HECNbdg5q9CGWfkjA4ogyqXEBGSiT2ElT X-Received: by 2002:a54:4e0e:: with SMTP id a14mr3439324oiy.88.1585757195147; Wed, 01 Apr 2020 09:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585757195; cv=none; d=google.com; s=arc-20160816; b=S1dHu8bYpF+72Ejb8cK5u8Vu57MjM2ErXvWfwIDvgXHqkX5yA4vm66lzpVNuMzCk55 64/XM9EW7c0T940ifDaAY1HzT41jc2R0tOE8k85whGOEwSs1iBNraP9TQVFQvaDwtq/L KkSxwx816Knf1ESdWjoKmK+IAJHcSSsLU/LVLldwbl5preeaHYQqTYmD8wlUK+waV+7v JrnnC8szc8T14ybuAITSUCfMQu4rrBQyg+zMopz0M7qdRYLeOeCVbjsgVHs8/JbKELwA VwBwiCXMwQfCfwj4IF0Ak4mKaPLTl4s+bBQrifskOyNNFO7TdNek1lsc3Sl7CSITwcMt NRRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:date:from:dkim-signature; bh=x0iGf5X4LVYTv3/i+3RQO+ppyXBQZXoUL8LL0fm5I0w=; b=ccshcI2mM9mZLcOmZsC3NaPHowC3/MEDo/U+ivQbtpvjmMs/Z51uvJD6DJcN3pm2GL I9+pN5KdcQFVDvsrEkjhnbbgBddbCzhn1cA0buzjSjxVai331p1/3DsVid1pWwN+hLsT 3iX/C1MhmMaJH/pGyodiPUBMqUEDnXCqbc2XERnKWYdJ8/SfKx2qUK60VUt1TNCc3wEp QxZw7dmTi5fV0QP0kqVj1mRbPXiIqR+MyGXb1FL8Ck7EPJBs3AEKrTCXrVwJFajvIkty fGpa+CgZQ5C2NzC4NeP92sZUXddi5PWQD22RW7aZAb7xgm+NYjkjhiBzKvIILVVbnTyA Dadg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXpjA8rT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si951791oie.70.2020.04.01.09.06.19; Wed, 01 Apr 2020 09:06:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXpjA8rT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbgDAQFL (ORCPT + 99 others); Wed, 1 Apr 2020 12:05:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44722 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgDAQFL (ORCPT ); Wed, 1 Apr 2020 12:05:11 -0400 Received: by mail-wr1-f67.google.com with SMTP id m17so659593wrw.11; Wed, 01 Apr 2020 09:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=x0iGf5X4LVYTv3/i+3RQO+ppyXBQZXoUL8LL0fm5I0w=; b=EXpjA8rTQUsKE+qdZqP/OdGd6eCxiipdusbCGRdMgrzSFDoTFfrG8GcWy5dSL+FGAu ZmAiMwADAOV9LvQ0JMLfaxNcfPTrWpQPuPaPxkK5bZQwQt4WNNGxNy2baRVZYXVIP5rT 6UR1mJoZ5uwMwQR09xEaxeei29Umc1sb9HHkqSPRgThc+AkTmVWz8YPHKtYWLcItT0IF rv4j9Om54xQbV/ZQtczS930PXJ/ze/EcF3UEvLj0otsGO+DW7cena5EZ7doG/84pnfO+ CO4Dlu39M6co2U7plhwPYNFD+2FDjGLuLuk7vU057+iIupH64dmPnABgUU6YlwoYav9W x7hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=x0iGf5X4LVYTv3/i+3RQO+ppyXBQZXoUL8LL0fm5I0w=; b=E2ezo9q0H6eKqlm34YpZYkwP88sl6PEfMO0c1MDcgSvVlcldNCMdpuBnL+s7w26HeA UxGNvQ0qXX68JjEKzaQaSUP8VkNlW2WNUKxz70Su6OfSw3D2E2QfZqs5gqNngNGFmkgl OOC5kz6SZnhXjyac9RxhQf2/Obtp/b+ClVMoamJHAQaSe7CjPcYvXomzimI7AiCE+bM3 ZZbFx+wcjzVmbjb+KSgfcQzjS79LrLIPw+j342ZtvjrmtqHT/5KoQNB134fRnJB7epYv Zhtnohvrv9YxQckEJw+OrJyPFoC6tpuevOCm/XvKnL7CBc82q+48pKgNVyWb2xRgC11e OSjA== X-Gm-Message-State: ANhLgQ0DfYFa5NRUQsHf2vRZTs9zFQbab2IZB+GLvU7luYpynSYA3Z7p 1o27bHZNXvo7fuG/17JHGg== X-Received: by 2002:a5d:460f:: with SMTP id t15mr26748856wrq.413.1585757108643; Wed, 01 Apr 2020 09:05:08 -0700 (PDT) Received: from earth.lan (host-92-23-85-227.as13285.net. [92.23.85.227]) by smtp.gmail.com with ESMTPSA id i21sm3321949wmb.23.2020.04.01.09.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 09:05:08 -0700 (PDT) From: Jules Irenge X-Google-Original-From: Jules Irenge Date: Wed, 1 Apr 2020 17:04:54 +0100 (BST) To: Jan Kara cc: Jules Irenge , linux-kernel@vger.kernel.org, boqun.feng@gmail.com, Alexander Viro , Dan Williams , Matthew Wilcox , "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() In-Reply-To: <20200401100125.GB19466@quack2.suse.cz> Message-ID: References: <0/7> <20200331204643.11262-1-jbi.octave@gmail.com> <20200331204643.11262-4-jbi.octave@gmail.com> <20200401100125.GB19466@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Apr 2020, Jan Kara wrote: > 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 > Thanks for the kind reply. I learned and changed. If there is a further issue, please do not hesitate to contact me. Thanks, Jules