diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-06 10:57:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-06 11:28:16 +0200 |
commit | d9e2daaf3d8649650cf9784b4fe9d9de4507da0c (patch) | |
tree | a6f5960da742e676f249036e59656dac040ecaed /src/import/import-raw.c | |
parent | 41d1ed059bbc863c73161f39594de2eb7b338886 (diff) |
btrfs: support recursively removing btrfs snapshots
Diffstat (limited to 'src/import/import-raw.c')
-rw-r--r-- | src/import/import-raw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/import/import-raw.c b/src/import/import-raw.c index 3a315139e5..ad8f806aff 100644 --- a/src/import/import-raw.c +++ b/src/import/import-raw.c @@ -241,10 +241,8 @@ static int raw_import_finish(RawImport *i) { return r; } - if (i->force_local) { - (void) btrfs_subvol_remove(i->final_path); - (void) rm_rf(i->final_path, REMOVE_ROOT|REMOVE_PHYSICAL); - } + if (i->force_local) + (void) rm_rf(i->final_path, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME); r = rename_noreplace(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path); if (r < 0) |