diff mbox

[v2,1/3] btrfs-progs: send: remove unnecessary code

Message ID 201610190345.AA00004@WIN-5MHF4RKU941.jp.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Tsutomu Itoh Oct. 19, 2016, 3:45 a.m. UTC
Some unnecessary codes are deleted.

 - the setting of subvol is double.
 - read only check was already done by previous loop.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
v2: description was changed
---
 cmds-send.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

David Sterba Oct. 19, 2016, 2:50 p.m. UTC | #1
On Wed, Oct 19, 2016 at 12:45:57PM +0900, Tsutomu Itoh wrote:
> Some unnecessary codes are deleted.
> 
>  - the setting of subvol is double.
>  - read only check was already done by previous loop.
> 
> Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/cmds-send.c b/cmds-send.c
index 74d0128..dfdfe01 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);