From patchwork Tue Mar 21 01:00:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 9635817 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 AC5D4601E9 for ; Tue, 21 Mar 2017 01:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 967E127165 for ; Tue, 21 Mar 2017 01:08:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89AA8277D9; Tue, 21 Mar 2017 01:08:16 +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 23AE627165 for ; Tue, 21 Mar 2017 01:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbdCUBF5 (ORCPT ); Mon, 20 Mar 2017 21:05:57 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:10655 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754979AbdCUBF4 (ORCPT ); Mon, 20 Mar 2017 21:05:56 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="16780483" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Mar 2017 09:01:02 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 83F9947C4E9A; Tue, 21 Mar 2017 09:01:00 +0800 (CST) Received: from localhost.localdomain (10.167.226.34) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 21 Mar 2017 09:00:59 +0800 From: Qu Wenruo To: CC: Subject: [PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image Date: Tue, 21 Mar 2017 09:00:55 +0800 Message-ID: <20170321010055.28530-1-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-Originating-IP: [10.167.226.34] X-yoursite-MailScanner-ID: 83F9947C4E9A.ACE7C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: quwenruo@cn.fujitsu.com 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 In check_convert_image(), for normal HOLE case, if the file extents are smaller than image size, we set ret to -EINVAL and print error message. But forget to return. This patch adds the missing return to fix it. Signed-off-by: Qu Wenruo --- convert/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/convert/main.c b/convert/main.c index 96358c62..c56382e9 100644 --- a/convert/main.c +++ b/convert/main.c @@ -1559,6 +1559,7 @@ next: ret = -EINVAL; error("inode %llu has some file extents not checked", ino); + return ret; } }