diff options
-rw-r--r-- | fs/fuse/fuse_i.h | 5 | ||||
-rw-r--r-- | fs/fuse/inode.c | 7 | ||||
-rw-r--r-- | fs/fuse/virtio_fs.c | 17 |
3 files changed, 3 insertions, 26 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d51598017d13..c036c4dc714a 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1025,11 +1025,6 @@ void fuse_conn_init(struct fuse_conn *fc, struct fuse_mount *fm, void fuse_conn_put(struct fuse_conn *fc); /** - * Acquire reference to fuse_mount - */ -struct fuse_mount *fuse_mount_get(struct fuse_mount *fm); - -/** * Release reference to fuse_mount */ void fuse_mount_put(struct fuse_mount *fm); diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 1a47afc95f80..654708574d5e 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -742,13 +742,6 @@ void fuse_mount_put(struct fuse_mount *fm) } EXPORT_SYMBOL_GPL(fuse_mount_put); -struct fuse_mount *fuse_mount_get(struct fuse_mount *fm) -{ - refcount_inc(&fm->count); - return fm; -} -EXPORT_SYMBOL_GPL(fuse_mount_get); - static struct inode *fuse_get_root_inode(struct super_block *sb, unsigned mode) { struct fuse_attr attr; diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index d2c0e58c6416..14d65db47778 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -1402,18 +1402,6 @@ static int virtio_fs_test_super(struct super_block *sb, return fsc_fm->fc->iq.priv == sb_fm->fc->iq.priv; } -static int virtio_fs_set_super(struct super_block *sb, - struct fs_context *fsc) -{ - int err; - - err = get_anon_bdev(&sb->s_dev); - if (!err) - fuse_mount_get(fsc->s_fs_info); - - return err; -} - static int virtio_fs_get_tree(struct fs_context *fsc) { struct virtio_fs *fs; @@ -1456,8 +1444,9 @@ static int virtio_fs_get_tree(struct fs_context *fsc) fc->auto_submounts = true; fsc->s_fs_info = fm; - sb = sget_fc(fsc, virtio_fs_test_super, virtio_fs_set_super); - fuse_mount_put(fm); + sb = sget_fc(fsc, virtio_fs_test_super, set_anon_super_fc); + if (fsc->s_fs_info) + fuse_mount_put(fm); if (IS_ERR(sb)) return PTR_ERR(sb); |