diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2016-10-19 12:45:57 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-10-25 14:28:36 +0200 |
commit | 876db7f50c0658f9c2946a341ad270f3968a28fc (patch) | |
tree | 4ee71c1fe688209bff17e9220c6dbd7ab494f324 | |
parent | a0fabf5f1dfae13e4b668d07d68bd37c7e383bb5 (diff) |
btrfs-progs: send: remove unnecessary code
Some unnecessary codes are deleted.
- the setting of subvol is duplicated
- read only check was already done by the previous loop
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds-send.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/cmds-send.c b/cmds-send.c index 74d01287..dfdfe018 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -564,8 +564,6 @@ int cmd_send(int argc, char **argv) } /* use first send subvol to determine mount_root */ - subvol = argv[optind]; - subvol = realpath(argv[optind], NULL); if (!subvol) { ret = -errno; @@ -661,15 +659,6 @@ int cmd_send(int argc, char **argv) } } - ret = is_subvol_ro(&send, subvol); - if (ret < 0) - goto out; - if (!ret) { - ret = -EINVAL; - error("subvolume %s is not read-only", subvol); - goto out; - } - if (new_end_cmd_semantic) { /* require new kernel */ is_first_subvol = (i == optind); |