Skip to content

Commit

Permalink
ceph: call ceph_mdsc_destroy from destroy_fs_client
Browse files Browse the repository at this point in the history
They're always called in succession.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Jeff Layton authored and Ilya Dryomov committed Sep 16, 2019
1 parent cf73d88 commit 3ee5a70
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ static void destroy_fs_client(struct ceph_fs_client *fsc)
{
dout("destroy_fs_client %p\n", fsc);

ceph_mdsc_destroy(fsc);
destroy_workqueue(fsc->inode_wq);
destroy_workqueue(fsc->cap_wq);

Expand Down Expand Up @@ -1105,7 +1106,6 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
}

if (ceph_sb_to_client(sb) != fsc) {
ceph_mdsc_destroy(fsc);
destroy_fs_client(fsc);
fsc = ceph_sb_to_client(sb);
dout("get_sb got existing client %p\n", fsc);
Expand All @@ -1131,7 +1131,6 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
goto out_final;

out:
ceph_mdsc_destroy(fsc);
destroy_fs_client(fsc);
out_final:
dout("ceph_mount fail %ld\n", PTR_ERR(res));
Expand All @@ -1155,8 +1154,6 @@ static void ceph_kill_sb(struct super_block *s)

ceph_fscache_unregister_fs(fsc);

ceph_mdsc_destroy(fsc);

destroy_fs_client(fsc);
free_anon_bdev(dev);
}
Expand Down

0 comments on commit 3ee5a70

Please sign in to comment.