Skip to content

Commit d38fa69

Browse files
glommerAl Viro
authored andcommitted
inode: move inode to a different list inside lock
When removing an element from the lru, this will be done today after the lock is released. This is a clear mistake, although we are not sure if the bugs we are seeing are related to this. All list manipulations are done inside the lock, and so should this one. Signed-off-by: Glauber Costa <glommer@openvz.org> Tested-by: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent bc3b14c commit d38fa69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ inode_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
735735

736736
WARN_ON(inode->i_state & I_NEW);
737737
inode->i_state |= I_FREEING;
738+
list_move(&inode->i_lru, freeable);
738739
spin_unlock(&inode->i_lock);
739740

740-
list_move(&inode->i_lru, freeable);
741741
this_cpu_dec(nr_unused);
742742
return LRU_REMOVED;
743743
}

0 commit comments

Comments
 (0)