Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbcLCLi1 (ORCPT ); Sat, 3 Dec 2016 06:38:27 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 649 Lines: 26 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; } /* -- 1.9.1