* [PATCH] fs: Add missing annotation for __wait_on_freeing_inode()
@ 2022-09-11 21:09 Jules Irenge
0 siblings, 0 replies; only message in thread
From: Jules Irenge @ 2022-09-11 21:09 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
Sparse reports a warning at __wait_on_freeing_inode()
warning: context imbalance in __wait_on_freeing_inode - unexpected unlock
The root cause is a missing annotation at __wait_on_freeing_inode()
Add the missing __releases(&inode->i_lock)
__must_hold(&inode_hash_lock) annotations
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
fs/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/inode.c b/fs/inode.c
index a1dd9a976add..b3ef550227b6 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -2219,6 +2219,7 @@ 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.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-11 21:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-11 21:09 [PATCH] fs: Add missing annotation for __wait_on_freeing_inode() Jules Irenge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).