summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2025-10-01 01:53:14 +0200
committerChristian Brauner <brauner@kernel.org>2025-10-20 20:22:25 +0200
commitdc816f8d925cac34922ea73abd94ae23a96cacac (patch)
treeb26f804cd12a931420590343925946a59a8183f4
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
fs: assert ->i_lock held in __iget()
Also remove the now redundant comment. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--include/linux/fs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c895146c1444..ac62b9d10b00 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3378,11 +3378,9 @@ static inline bool is_zero_ino(ino_t ino)
return (u32)ino == 0;
}
-/*
- * inode->i_lock must be held
- */
static inline void __iget(struct inode *inode)
{
+ lockdep_assert_held(&inode->i_lock);
atomic_inc(&inode->i_count);
}