Skip to contentSkip to conversation

fs: Add missing annotation for __wait_on_freeing_inode()

PATCH New Jules Irenge 1 participant 1 message Sep 11, 2022 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 a missing annotation at __wait_on_freeing_inode()

Add the missing __releases(&inode->i_lock)
__must_hold(&inode_hash_lock) annotations

---
 fs/inode.c | 1 +
 1 file changed, 1 insertion(+)
fs/inode.c +1 -0
index a1dd9a976add..b3ef550227b6 100644
@@ -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);
Signature · 1 line
2.35.1