fuse: cleanup fuse_file refcounting

struct fuse_file is stored in file->private_data.  Make this always be a
counting reference for consistency.

This also allows fuse_sync_release() to call fuse_file_put() instead of
partially duplicating its functionality.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Miklos Szeredi
2017-02-22 20:08:25 +01:00
parent 2e38bea99a
commit 267d84449f
3 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
if (err) {
fuse_sync_release(ff, flags);
} else {
file->private_data = fuse_file_get(ff);
file->private_data = ff;
fuse_finish_open(inode, file);
}
return err;