From patchwork Sat Dec 3 11:01:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pan Bian X-Patchwork-Id: 9459617 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 5DCA36074E for ; Sat, 3 Dec 2016 11:38:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E62928487 for ; Sat, 3 Dec 2016 11:38:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F7112849C; Sat, 3 Dec 2016 11:38:49 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 F021D28487 for ; Sat, 3 Dec 2016 11:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437AbcLCLi0 (ORCPT ); Sat, 3 Dec 2016 06:38:26 -0500 Received: from mproxygzc4.163.com ([218.107.63.212]:57087 "EHLO mproxygzc4.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbcLCLiZ (ORCPT ); Sat, 3 Dec 2016 06:38:25 -0500 X-Greylist: delayed 909 seconds by postgrey-1.27 at vger.kernel.org; Sat, 03 Dec 2016 06:38:22 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=/TuU6XgJ0xuWFrylJR eZnc5Redbtb2pSEl9uxVlG0M0=; b=C6J552ikXY3AOoQ58xkX5xPrpR+AtHPMs+ XxRUhvtWuXU18KeCt24LrlQxDw+aDneDPmEYPUYMTJgvN8aikhe1u+zkJCtNhpvf /ReXd8Bi+p1svK67AlgGuXMVlYqKnEMTis1V6wwkBnhTwl/OLWR1iLIwn9Ly/uLM mm0BSTsww= Received: from localhost.localdomain (unknown [222.131.246.88]) by smtp1 (Coremail) with SMTP id C9GowAC3HggZpkJYNBgiIQ--.55077S3; Sat, 03 Dec 2016 19:01:49 +0800 (CST) From: Pan Bian To: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Pan Bian Subject: [PATCH 1/1] btrfs: volumes: fix improper return value Date: Sat, 3 Dec 2016 19:01:45 +0800 Message-Id: <1480762905-5163-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: C9GowAC3HggZpkJYNBgiIQ--.55077S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKF1rXFWDZw1kJw48Jw4xJFb_yoWxZrc_Wa 4xXa9Fgr9rJr17Ww1FyFZ8tFZagw1jkr1kJa4aga13tFs8C3Z8Aa1kXrZI9r9rWw4xGr98 Cr9Yqa4jk343GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUedWrJUUUUU== X-Originating-IP: [222.131.246.88] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/xtbBZAk1clQG62RUZQAAsG 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 Variable ret takes the errno on failures. However, it directly returns 0. It may be better to return "ret". Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188741 Signed-off-by: Pan Bian --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 71a60cc..32fd903 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -4222,7 +4222,7 @@ static int btrfs_uuid_scan_kthread(void *data) else set_bit(BTRFS_FS_UPDATE_UUID_TREE_GEN, &fs_info->flags); up(&fs_info->uuid_tree_rescan_sem); - return 0; + return ret; } /*