summaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-25 19:54:29 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-25 19:54:29 +0100
commit7bb5226c8a4bbf26a9ededc90532b0ad539d2017 (patch)
tree73ddf0d8db109a3b14710269630366fa68290317 /fs/inode.c
parentMerge tag 'docs-5.11-2' of git://git.lwn.net/linux (diff)
parentfix hostfs_open() use of ->f_path.dentry (diff)
downloadlinux-7bb5226c8a4bbf26a9ededc90532b0ad539d2017.tar.xz
linux-7bb5226c8a4bbf26a9ededc90532b0ad539d2017.zip
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted patches from previous cycle(s)..." * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix hostfs_open() use of ->f_path.dentry Make sure that make_create_in_sticky() never sees uninitialized value of dir_mode fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode() fs/namespace.c: WARN if mnt_count has become negative
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index cb008acf0efd..6442d97d9a4a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1624,7 +1624,9 @@ static void iput_final(struct inode *inode)
else
drop = generic_drop_inode(inode);
- if (!drop && (sb->s_flags & SB_ACTIVE)) {
+ if (!drop &&
+ !(inode->i_state & I_DONTCACHE) &&
+ (sb->s_flags & SB_ACTIVE)) {
inode_add_lru(inode);
spin_unlock(&inode->i_lock);
return;