diff options
-rw-r--r-- | fs/btrfs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 66e4612a791..141fb317d3b 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -566,6 +566,12 @@ static int btrfs_test_super(struct super_block *s, void *data) | |||
566 | struct btrfs_fs_devices *test_fs_devices = data; | 566 | struct btrfs_fs_devices *test_fs_devices = data; |
567 | struct btrfs_root *root = btrfs_sb(s); | 567 | struct btrfs_root *root = btrfs_sb(s); |
568 | 568 | ||
569 | /* | ||
570 | * If this super block is going away, return false as it | ||
571 | * can't match as an existing super block. | ||
572 | */ | ||
573 | if (!atomic_read(&s->s_active)) | ||
574 | return 0; | ||
569 | return root->fs_info->fs_devices == test_fs_devices; | 575 | return root->fs_info->fs_devices == test_fs_devices; |
570 | } | 576 | } |
571 | 577 | ||