diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2018-11-09 11:33:27 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-02-13 13:15:14 +0100 |
commit | c9d8f5f0692d5960ed50970ffe63756fb8f96cdb (patch) | |
tree | 14fc8a5ccd62ebd531094841a41686e6dd255276 /fs/fuse/inode.c | |
parent | fuse: Introduce fi->lock to protect write related fields (diff) | |
download | linux-c9d8f5f0692d5960ed50970ffe63756fb8f96cdb.tar.xz linux-c9d8f5f0692d5960ed50970ffe63756fb8f96cdb.zip |
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/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 4c767175bd34..3d1a63e95f69 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -325,9 +325,9 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid, } fi = get_fuse_inode(inode); - spin_lock(&fc->lock); + spin_lock(&fi->lock); fi->nlookup++; - spin_unlock(&fc->lock); + spin_unlock(&fi->lock); fuse_change_attributes(inode, attr, attr_valid, attr_version); return inode; |