Skip to contentSkip to conversation

ceph: switch to ceph_test_mount_opt helper

PATCH New [email protected] 1 participant 1 message Feb 14, 2020 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: switch to ceph_test_mount_opt helper

From: Xiubo Li <[email protected]>

Clean up the code.

---
 fs/ceph/mds_client.c | 3 +--
 fs/ceph/super.c      | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
fs/ceph/mds_client.c +1 -2
index 451c3727cd0b..8a8aaa20699c 100644
@@ -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;
fs/ceph/super.c +1 -1
index abdf61909879..c494351e3cc8 100644
@@ -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;
Signature · 1 line
2.21.0