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>
This commit is contained in:

committed by
Miklos Szeredi

parent
f15ecfef05
commit
c9d8f5f069
@@ -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;
|
||||
|
Reference in New Issue
Block a user