From: Glauber Costa Date: Wed, 28 Aug 2013 00:17:59 +0000 (+1000) Subject: inode: move inode to a different list inside lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d38fa6986e9124f827aa6ea4a9dde01e67a37be7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Michal Hocko Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Al Viro --- diff --git a/fs/inode.c b/fs/inode.c index a973d268c157..5b1ec47c5d39 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -735,9 +735,9 @@ inode_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg) WARN_ON(inode->i_state & I_NEW); inode->i_state |= I_FREEING; + list_move(&inode->i_lru, freeable); spin_unlock(&inode->i_lock); - list_move(&inode->i_lru, freeable); this_cpu_dec(nr_unused); return LRU_REMOVED; }