From patchwork Wed Oct 8 09:42:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 5052921 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5EC8C11AB for ; Wed, 8 Oct 2014 09:44:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 416B02024C for ; Wed, 8 Oct 2014 09:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5372720200 for ; Wed, 8 Oct 2014 09:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755992AbaJHJnr (ORCPT ); Wed, 8 Oct 2014 05:43:47 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:53100 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756235AbaJHJni (ORCPT ); Wed, 8 Oct 2014 05:43:38 -0400 Received: by mail-pa0-f44.google.com with SMTP id et14so8816869pad.31 for ; Wed, 08 Oct 2014 02:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5iAbtNkXx7R+6dMpLS3khIHNnrV8x4tl6BLHZJ+4gcI=; b=SOXjNDx4zub17hTqjc8pEkCZ0aFy9hZxmSGPiaV0AV9CW2o86yNelEVYrcUGvOg8xe Eb1/O0MhHAhJqaSEXtIQcAI7Jg5iSsby3bmyLU14QCIC9JfCdV9/0T+toZROKeEOtxY/ Lo73JHDvTP8OV5FdAttsregsMl4skB+R6Z4vbB318eSLFxEKWbGEYhrB40gnF5yJAqej wemC1RADMY2mx5nJu8GnnQJUWuSZDyfv7nwp1v2bioZtjKLVhEMP5KpZllY7L+gPgt2W 3sF/KThx7kk6L4KsNRiRGztp3WRmEpZmpJJAd76aYrAYaXneYgoR1aNTPaEZrhNnDxxS Bm4g== X-Received: by 10.70.123.170 with SMTP id mb10mr9431768pdb.130.1412761418426; Wed, 08 Oct 2014 02:43:38 -0700 (PDT) Received: from localhost ([203.114.244.88]) by mx.google.com with ESMTPSA id va2sm18468433pac.15.2014.10.08.02.43.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Oct 2014 02:43:37 -0700 (PDT) From: Eryu Guan To: linux-btrfs@vger.kernel.org Cc: Eryu Guan Subject: [PATCH 2/2] btrfs-progs: return error when canonicalize_path failed Date: Wed, 8 Oct 2014 17:42:29 +0800 Message-Id: <1412761349-32721-2-git-send-email-guaneryu@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1412761349-32721-1-git-send-email-guaneryu@gmail.com> References: <1412761349-32721-1-git-send-email-guaneryu@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Error out cmd_start_replace() if canonicalize_path() dstdev failed, add the missing "goto leave_with_error;" Signed-off-by: Eryu Guan --- cmds-replace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-replace.c b/cmds-replace.c index 51b7aaf..d5648d5 100644 --- a/cmds-replace.c +++ b/cmds-replace.c @@ -213,6 +213,7 @@ static int cmd_start_replace(int argc, char **argv) fprintf(stderr, "ERROR: Could not canonicalize path '%s': %s\n", argv[optind + 1], strerror(errno)); + goto leave_with_error; } if (is_numerical(srcdev)) {