From patchwork Wed Oct 19 02:34:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 9383505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 047AF60839 for ; Wed, 19 Oct 2016 02:35:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB13F29730 for ; Wed, 19 Oct 2016 02:35:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFF3A29836; Wed, 19 Oct 2016 02:35:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5652429730 for ; Wed, 19 Oct 2016 02:35:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933712AbcJSCfI (ORCPT ); Tue, 18 Oct 2016 22:35:08 -0400 Received: from mgwym03.jp.fujitsu.com ([211.128.242.42]:26413 "EHLO mgwym03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754588AbcJSCfD (ORCPT ); Tue, 18 Oct 2016 22:35:03 -0400 Received: from yt-mxq.gw.nic.fujitsu.com (unknown [192.168.229.66]) by mgwym03.jp.fujitsu.com with smtp id 6db9_387b_ba66b2be_e2f9_45e4_90c0_84650067a4c2; Wed, 19 Oct 2016 11:34:54 +0900 Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by yt-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 96AE2AC00C0 for ; Wed, 19 Oct 2016 11:34:47 +0900 (JST) Received: from WIN-5MHF4RKU941.jp.fujitsu.com (unknown [10.124.102.163]) by m3050.s.css.fujitsu.com (Postfix) with SMTP id 7794F450 for ; Wed, 19 Oct 2016 11:34:47 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 5b5c5af556ef4a19bae18b333c705a5c Message-Id: <201610190234.AA00001@WIN-5MHF4RKU941.jp.fujitsu.com> From: Tsutomu Itoh Date: Wed, 19 Oct 2016 11:34:25 +0900 To: linux-btrfs@vger.kernel.org Subject: [PATCH 1/3] btrfs-progs: send: remove unnecessary code MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some unnecessary codes is deleted. Signed-off-by: Tsutomu Itoh --- cmds-send.c | 11 ----------- 1 file changed, 11 deletions(-) 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);