Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2018090ybt; Sun, 28 Jun 2020 05:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnjsE4+YDgchVNCTFAej1KkJdkmpeeoQBzxy7ajCaK5LSunXCZotto1rIqkpfdfTc7dHhr X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr5134137edb.51.1593347532886; Sun, 28 Jun 2020 05:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593347532; cv=none; d=google.com; s=arc-20160816; b=i/UF2o3XqySSqz/FMZVEYp0/uva09MyJy24AKEzVODsGoQQKHjXChRdaBWIcl2DXdR dIonA04iFpTfV/9W6MStI/IU/Wbp9JeKq8EbtxoqQsbQ4yl+nOnfNpV+CI2E1fDN3Xv8 muZxOIbulnMHDBX/63nyVj/1g6vJGEB91qsDNDkGKLVLCuYdwbzNaQB0wNbFG+JwCT26 0AXAVPOiMY1VoYfB1O5j5I1KuKvGpgg4Nw0ptkmzt00zlHNh0X8o6TdKvYixXxHVuXW2 XhKi82cm/DGSC5Dxe+WmMhqCtYoRQ1npHWFFZwPYBEdPrcaBBfwtOwIklXQtsHInwg3x zUCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uo2G1BS3RCpYj5ND+Wx+BSDqsOLSGY7eaPgXPBAtpB8=; b=RV9DAk4gO0NBe7mjwCf4SDA9QTixkPB9ZcdF/snsK9j6zowqsl3l6tVqNroyTb/AQ+ 9eT7tMw11mn70NhGVcDG0k+NRTkZpOm99bGJRPE+RTCherP06h6ej5LuHJqRm8cdXZmZ 1IYdQm+dLIdMPBaVgfpsEq869Pdgg9LkP23Al/F6x5LyPAGVJ29IyAdsBmaC570v+7Vb hogJb4LXB5hu4RaH6+KxmIlRNbPyu5O8gsau2mHmS6H5mIz/DZ3/2fVHiABJuGQ9H6bC XbqaFI+8x5QLza9CeGjDsuBRusoeMIm/B66FltkmNZ2B7O6DnkYGvTXxLGoTO2kJ3VEH Xz0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si14702779ejq.299.2020.06.28.05.31.50; Sun, 28 Jun 2020 05:32:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbgF1MaS (ORCPT + 99 others); Sun, 28 Jun 2020 08:30:18 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33740 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726344AbgF1MaS (ORCPT ); Sun, 28 Jun 2020 08:30:18 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AC6F8B8F7D5A3835E5DC; Sun, 28 Jun 2020 20:30:14 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sun, 28 Jun 2020 20:30:06 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH 1/3] f2fs: fix wrong return value of f2fs_bmap_compress() Date: Sun, 28 Jun 2020 20:29:38 +0800 Message-ID: <20200628122940.29665-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If compression is disable, we should return zero rather than -EOPNOTSUPP to indicate f2fs_bmap() is not supported. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index dfd322515357..91dc7b598961 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3703,10 +3703,9 @@ static sector_t f2fs_bmap_compress(struct inode *inode, sector_t block) } f2fs_put_dnode(&dn); - return blknr; #else - return -EOPNOTSUPP; + return 0; #endif } -- 2.26.2