diff mbox series

ceph: switch to ceph_test_mount_opt helper

Message ID 20200214083225.2804-1-xiubli@redhat.com (mailing list archive)
State New, archived
Headers show
Series ceph: switch to ceph_test_mount_opt helper | expand

Commit Message

Xiubo Li Feb. 14, 2020, 8:32 a.m. UTC
From: Xiubo Li <xiubli@redhat.com>

Clean up the code.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/ceph/mds_client.c | 3 +--
 fs/ceph/super.c      | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

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;