diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/super.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f878337cee6f..9771eb8694b6 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -325,9 +325,15 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, | |||
325 | break; | 325 | break; |
326 | case Opt_subvolid: | 326 | case Opt_subvolid: |
327 | intarg = 0; | 327 | intarg = 0; |
328 | match_int(&args[0], &intarg); | 328 | error = match_int(&args[0], &intarg); |
329 | if (intarg) | 329 | if (!error) { |
330 | *subvol_objectid = intarg; | 330 | /* we want the original fs_tree */ |
331 | if (!intarg) | ||
332 | *subvol_objectid = | ||
333 | BTRFS_FS_TREE_OBJECTID; | ||
334 | else | ||
335 | *subvol_objectid = intarg; | ||
336 | } | ||
331 | break; | 337 | break; |
332 | case Opt_device: | 338 | case Opt_device: |
333 | error = btrfs_scan_one_device(match_strdup(&args[0]), | 339 | error = btrfs_scan_one_device(match_strdup(&args[0]), |