Because nobody reads comments... Signed-off-by: Peter Zijlstra (Intel) --- fs/inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/fs/inode.c +++ b/fs/inode.c @@ -384,11 +384,9 @@ static void init_once(void *foo) inode_init_once(inode); } -/* - * inode->i_lock must be held - */ void __iget(struct inode *inode) { + lockdep_assert_held(&inode->i_lock); atomic_inc(&inode->i_count); } @@ -409,11 +407,10 @@ static void inode_lru_list_add(struct in /* * Add inode to LRU if needed (inode is unused and clean). - * - * Needs inode->i_lock held. */ void inode_add_lru(struct inode *inode) { + lockdep_assert_held(&inode->i_lock); if (!(inode->i_state & (I_DIRTY_ALL | I_SYNC | I_FREEING | I_WILL_FREE)) && !atomic_read(&inode->i_count) && inode->i_sb->s_flags & MS_ACTIVE)