summaryrefslogtreecommitdiff
path: root/fs/fuse/readdir.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 15:15:14 +0300
commitc9d8f5f0692d5960ed50970ffe63756fb8f96cdb (patch)
tree14fc8a5ccd62ebd531094841a41686e6dd255276 /fs/fuse/readdir.c
parentf15ecfef058d94d03bdb35dcdfda041b3de9d543 (diff)
downloadlinux-c9d8f5f0692d5960ed50970ffe63756fb8f96cdb.tar.xz
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/readdir.c')
-rw-r--r--fs/fuse/readdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c
index ab18b78f4755..574d03f8a573 100644
--- a/fs/fuse/readdir.c
+++ b/fs/fuse/readdir.c
@@ -213,9 +213,9 @@ retry:
}
fi = get_fuse_inode(inode);
- spin_lock(&fc->lock);
+ spin_lock(&fi->lock);
fi->nlookup++;
- spin_unlock(&fc->lock);
+ spin_unlock(&fi->lock);
forget_all_cached_acls(inode);
fuse_change_attributes(inode, &o->attr,