aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 340a92d08e84..2c2d6d1d8eee 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -529,12 +529,12 @@ static noinline int device_list_add(const char *path,
529 */ 529 */
530 530
531 /* 531 /*
532 * As of now don't allow update to btrfs_fs_device through 532 * For now, we do allow update to btrfs_fs_device through the
533 * the btrfs dev scan cli, after FS has been mounted. 533 * btrfs dev scan cli after FS has been mounted. We're still
534 * tracking a problem where systems fail mount by subvolume id
535 * when we reject replacement on a mounted FS.
534 */ 536 */
535 if (fs_devices->opened) { 537 if (!fs_devices->opened && found_transid < device->generation) {
536 return -EBUSY;
537 } else {
538 /* 538 /*
539 * That is if the FS is _not_ mounted and if you 539 * That is if the FS is _not_ mounted and if you
540 * are here, that means there is more than one 540 * are here, that means there is more than one
@@ -542,8 +542,7 @@ static noinline int device_list_add(const char *path,
542 * with larger generation number or the last-in if 542 * with larger generation number or the last-in if
543 * generation are equal. 543 * generation are equal.
544 */ 544 */
545 if (found_transid < device->generation) 545 return -EEXIST;
546 return -EEXIST;
547 } 546 }
548 547
549 name = rcu_string_strdup(path, GFP_NOFS); 548 name = rcu_string_strdup(path, GFP_NOFS);