From: Xiubo Li <xiubli@xxxxxxxxxx> Clean up the code. Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/mds_client.c | 3 +-- fs/ceph/super.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 451c3727cd0b..8a8aaa20699c 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2643,8 +2643,7 @@ static void __do_request(struct ceph_mds_client *mdsc, list_add(&req->r_wait, &mdsc->waiting_for_map); return; } - if (!(mdsc->fsc->mount_options->flags & - CEPH_MOUNT_OPT_MOUNTWAIT) && + if (!ceph_test_mount_opt(mdsc->fsc, MOUNTWAIT) && !ceph_mdsmap_is_cluster_available(mdsc->mdsmap)) { err = -EHOSTUNREACH; goto finish; diff --git a/fs/ceph/super.c b/fs/ceph/super.c index abdf61909879..c494351e3cc8 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -992,7 +992,7 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, goto out; /* setup fscache */ - if (fsc->mount_options->flags & CEPH_MOUNT_OPT_FSCACHE) { + if (ceph_test_mount_opt(fsc, FSCACHE)) { err = ceph_fscache_register_fs(fsc, fc); if (err < 0) goto out; -- 2.21.0