Skip to content

Commit dc816f8

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent 3a86608 commit dc816f8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

include/linux/fs.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,11 +3378,9 @@ static inline bool is_zero_ino(ino_t ino)
33783378
return (u32)ino == 0;
33793379
}
33803380

3381-
/*
3382-
* inode->i_lock must be held
3383-
*/
33843381
static inline void __iget(struct inode *inode)
33853382
{
3383+
lockdep_assert_held(&inode->i_lock);
33863384
atomic_inc(&inode->i_count);
33873385
}
33883386

0 commit comments

Comments
 (0)