VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: Linus Torvalds <torvalds@linux-foundation.org> 2017-05-09 09:12:53 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2017-05-09 09:12:53 -0700 commit: 11fbf53d66ec302fe50b06bd7cb4863dbb98775a parent: 339fbf6796f8e74544091adbf511286768eaf93e
Commit Summary:
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/inode.c b/fs/inode.c
index 6ad1edb52045..db5914783a71 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -402,6 +402,8 @@ static void inode_lru_list_add(struct inode *inode)
 {
 	if (list_lru_add(&inode->i_sb->s_inode_lru, &inode->i_lru))
 		this_cpu_inc(nr_unused);
+	else
+		inode->i_state |= I_REFERENCED;
 }
 
 /*
@@ -1489,7 +1491,6 @@ static void iput_final(struct inode *inode)
 		drop = generic_drop_inode(inode);
 
 	if (!drop && (sb->s_flags & MS_ACTIVE)) {
-		inode->i_state |= I_REFERENCED;
 		inode_add_lru(inode);
 		spin_unlock(&inode->i_lock);
 		return;