summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-11-09 13:33:27 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2019-02-13 13:15:14 +0100
commitc9d8f5f0692d5960ed50970ffe63756fb8f96cdb (patch)
tree14fc8a5ccd62ebd531094841a41686e6dd255276 /fs/fuse/dir.c
parentf15ecfef058d94d03bdb35dcdfda041b3de9d543 (diff)
downloadlinux-c9d8f5f0692d5960ed50970ffe63756fb8f96cdb.tar.bz2
fuse: Protect fi->nlookup with fi->lock
This continues previous patch and introduces the same protection for nlookup field. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index eb7dfb0d9513..dd0f64f7bc06 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -207,9 +207,9 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
fuse_queue_forget(fc, forget, outarg.nodeid, 1);
goto invalid;
}
- spin_lock(&fc->lock);
+ spin_lock(&fi->lock);
fi->nlookup++;
- spin_unlock(&fc->lock);
+ spin_unlock(&fi->lock);
}
kfree(forget);
if (ret == -ENOMEM)