diff mbox series

[v2,4/4] ceph: allow mds_namespace to appear multiple times

Message ID OSZP286MB2061102C184A68C0CED86D83C02AA@OSZP286MB2061.JPNP286.PROD.OUTLOOK.COM (mailing list archive)
State New, archived
Headers show
Series ceph: account for name and fsid in new device spec | expand

Commit Message

胡玮文 June 30, 2023, 4:31 a.m. UTC
To be consistent with other options.  It will still be rejected if its
final value is inconsistent with mount source.

Signed-off-by: Hu Weiwen <huww98@outlook.com>
---
 fs/ceph/super.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index e66867efd811..96aba62fdcba 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -423,12 +423,9 @@  static int ceph_parse_mount_param(struct fs_context *fc,
 		param->string = NULL;
 		break;
 	case Opt_mds_namespace:
-		if (!fsopt->mds_namespace) {
-			fsopt->mds_namespace = param->string;
-			param->string = NULL;
-		} else if (strcmp(fsopt->mds_namespace, param->string)) {
-			return invalfc(fc, "Mismatching mds_namespace");
-		}
+		kfree(fsopt->mds_namespace);
+		fsopt->mds_namespace = param->string;
+		param->string = NULL;
 		break;
 	case Opt_recover_session:
 		mode = result.uint_32;