[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200316233804.96657-4-jbi.octave@gmail.com>
Date: Mon, 16 Mar 2020 23:38:01 +0000
From: Jules Irenge <jbi.octave@...il.com>
To: boqun.feng@...il.com
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 3/6] fs: Add missing annotation for __wait_on_freeing_inode()
Sparse reports a warning at __wait_on_freeing_inode()
warning: context imbalance in __wait_on_freeing_inode() - unexpected unlock
The root cause is the missing annotations at __wait_on_freeing_inode()
Add the missing __releases(&inode->i_lock)
and __must_hold(&inode_hash_lock) annotations
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
fs/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/inode.c b/fs/inode.c
index 7d57068b6b7a..3b06c5c59883 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1955,6 +1955,8 @@ EXPORT_SYMBOL(inode_needs_sync);
* will DTRT.
*/
static void __wait_on_freeing_inode(struct inode *inode)
+ __releases(&inode->i_lock)
+ __must_hold(&inode_hash_lock)
{
wait_queue_head_t *wq;
DEFINE_WAIT_BIT(wait, &inode->i_state, __I_NEW);
--
2.24.1
Powered by blists - more mailing lists