diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-11-11 17:22:32 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-11-11 17:22:32 +0100 |
commit | 514b5e3ff45e6cfc39cfa7c094727d8e6d885986 (patch) | |
tree | d6f6ae05d63a074f6f5da8f5b79c58ba47bd96a6 /fs/fuse/dir.c | |
parent | b19d3d00d662cfb8bfdc809ec90344ec58b0bf31 (diff) |
fuse: get rid of fuse_mount refcount
Fuse mount now only ever has a refcount of one (before being freed) so the
count field is unnecessary.
Remove the refcounting and fold fuse_mount_put() into callers. The only
caller of fuse_mount_put() where fm->fc was NULL is fuse_dentry_automount()
and here the fuse_conn_put() can simply be omitted.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ff7dbeb16f88..e9c244524985 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -328,12 +328,11 @@ static struct vfsmount *fuse_dentry_automount(struct path *path) if (!fm) goto out_put_fsc; - refcount_set(&fm->count, 1); fsc->s_fs_info = fm; sb = sget_fc(fsc, NULL, set_anon_super_fc); if (IS_ERR(sb)) { err = PTR_ERR(sb); - fuse_mount_put(fm); + kfree(fm); goto out_put_fsc; } fm->fc = fuse_conn_get(fc); |