aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 0b3167bd9f35..3fca9f9e3b5d 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4431,6 +4431,10 @@ static int btrfs_check_uuid_tree_entry(struct btrfs_fs_info *fs_info,
ret = 1;
goto out;
}
+ if (!btrfs_grab_fs_root(subvol_root)) {
+ ret = 1;
+ goto out;
+ }
switch (type) {
case BTRFS_UUID_KEY_SUBVOL:
@@ -4443,7 +4447,7 @@ static int btrfs_check_uuid_tree_entry(struct btrfs_fs_info *fs_info,
ret = 1;
break;
}
-
+ btrfs_put_fs_root(subvol_root);
out:
return ret;
}