mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: Add missing annotation for iput_final()
@ 2022-09-11 14:05 Jules Irenge
  0 siblings, 0 replies; only message in thread
From: Jules Irenge @ 2022-09-11 14:05 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel

Sparse reports a warning at iput_final()

warning: context imbalance in iput_final - unexpected unlock

The root cause is the missing annotation at iput_final()

Add the missing __releases(&inode->i_lock) annotation

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 ba1de23c13c1..a1dd9a976add 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1706,6 +1706,7 @@ EXPORT_SYMBOL(generic_delete_inode);
  * shutting down.
  */
 static void iput_final(struct inode *inode)
+	__releases(&inode->i_lock)
 {
 	struct super_block *sb = inode->i_sb;
 	const struct super_operations *op = inode->i_sb->s_op;
-- 
2.35.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-11 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 14:05 [PATCH] fs: Add missing annotation for iput_final() Jules Irenge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®