ceph: record updated mon_addr on remount
[sfrench/cifs-2.6.git] / fs / ceph / super.c
index e2c40d05571180d432b24be9d4f767bf65eccc2a..31b5786cd98fb20be56c6adb3fc0c04c164e40f8 100644 (file)
@@ -1277,6 +1277,13 @@ static int ceph_reconfigure_fc(struct fs_context *fc)
        else
                ceph_clear_mount_opt(fsc, ASYNC_DIROPS);
 
+       if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) {
+               kfree(fsc->mount_options->mon_addr);
+               fsc->mount_options->mon_addr = fsopt->mon_addr;
+               fsopt->mon_addr = NULL;
+               pr_notice("ceph: monitor addresses recorded, but not used for reconnection");
+       }
+
        sync_filesystem(fc->root->d_sb);
        return 0;
 }