summaryrefslogtreecommitdiff
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-11-11 17:22:32 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2020-11-11 17:22:32 +0100
commit514b5e3ff45e6cfc39cfa7c094727d8e6d885986 (patch)
treed6f6ae05d63a074f6f5da8f5b79c58ba47bd96a6 /fs/fuse/dir.c
parentb19d3d00d662cfb8bfdc809ec90344ec58b0bf31 (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.c3
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);