Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4379276pxv; Tue, 29 Jun 2021 05:50:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXdylV3ANi6FLjIb9Cs0hjimWTJt1ClqMlTMC6Gzud2XOri/gwLKQOHVYASplKZr4QbxsI X-Received: by 2002:a05:6402:216:: with SMTP id t22mr16565802edv.70.1624971031863; Tue, 29 Jun 2021 05:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624971031; cv=none; d=google.com; s=arc-20160816; b=NcwzfswxeYt9J5rh/2KlU4//Vwv2DdsJqYsim/+ALaSfbrPCvTmPcMH9PfveimlDb0 8W6jpVjMSIXslrKwG74ikER2qHf81cnvYbARP0hGQvzRN5D48LnGbVCx4raqr12c+299 YlXyIgGdDItJS/dQqMH6iIlua9t3Je2+UoY0rknA6zpb68Iv6SMjFyMo2Ny2+ZopAg3w zA7mrwRSm7VtxhrMvO6zx0rGiGH4KkcxcVo+6jc2scr76ST/mqnGbpjvth6hSkU1tavo lidEDivyBf9DKLB9Ia7ZgJNLv4/gEgX4QogqyiX5MBdXfRuP154cLFab7s52Wer1uNy9 8ZsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=sfTj/Onwm/8mctLs4jl3YD3zYZRkJI6Vg1SHgkrYB8U=; b=DJlH6nKV3m7+QJ+baBPL8BUq2ox4aGX55X0RPGt0aTY7D157+4yv8Ubmwl2tp8qspp ILspjRx0SdL08SlZoLp5dPq9gqz+H+pyBGlr9Ai7c51k+bjdb4HZdyxpMLAR+y6Aj9LH B5AhtViwRO7s/gcKoChcINhicahQd9KJXusu2dPRiqFDWS+1B+1+3zRGrPxNClicb5qR cJpPcpw/rMq62PGeweyUGSZIusqhEsEYDm41+9WgdBn+hW5nPJqsQyIYR+AMQVQyF23d yFKE5z6kb3ZomOARAAeQe70YEPkRBbA+PFHE06zr9CoQxPwN1xsken6QRad+wzcNS16K XK1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=UG737XaK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si17608887edd.477.2021.06.29.05.50.06; Tue, 29 Jun 2021 05:50:31 -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; dkim=pass header.i=@163.com header.s=s110527 header.b=UG737XaK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233077AbhF2KnX (ORCPT + 99 others); Tue, 29 Jun 2021 06:43:23 -0400 Received: from m12-12.163.com ([220.181.12.12]:53876 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233111AbhF2KnV (ORCPT ); Tue, 29 Jun 2021 06:43:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=sfTj/Onwm/8mctLs4j l3YD3zYZRkJI6Vg1SHgkrYB8U=; b=UG737XaK60KiQ2V3p4dPj4cBfclV4nUSkZ Nj78uIBYckQZWCMWY6DCquqYTpiNmS0F4ieXkNAobRsIoXR8D4qxsKS+QNy1yJSe uBftqqDm0teMP9IM49ginsmtp4k1bfLBoM4K34lglRvkU+4D0Wc2byNv1nyPDtPP fiNqG2ggA= Received: from localhost.localdomain (unknown [218.17.89.92]) by smtp8 (Coremail) with SMTP id DMCowAC3fVqw7dpgLLt8MQ--.18080S2; Tue, 29 Jun 2021 17:53:53 +0800 (CST) From: lijian_8010a29@163.com To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, lijian Subject: [PATCH] fs: ntfs: super: added return error value while map failed Date: Tue, 29 Jun 2021 09:53:33 +0000 Message-Id: <20210629095333.115111-1-lijian_8010a29@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: DMCowAC3fVqw7dpgLLt8MQ--.18080S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XFy3Zw4rtF1fWryxGryUJrb_yoWxCwb_Ga 1xZry8Grs8t3Wa9ryqkwnrZr4kta1rCF13K3WDtwnxZF1UJr4UX3yDXr1Dta1rWrZrZF9r WFWv93W0k3WS9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5lYLPUUUUU== X-Originating-IP: [218.17.89.92] X-CM-SenderInfo: 5olmxttqbyiikqdsmqqrwthudrp/xtbBLBHAUF++MX9d-AAAsj Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: lijian When lookup_extent_mapping failed, should return '-ENOENT'. Signed-off-by: lijian --- fs/btrfs/extent_map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 4a8e02f7b6c7..e9d9f2bfc11d 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -305,8 +305,10 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, WARN_ON(!em || em->start != start); - if (!em) + if (!em) { + ret = -ENOENT; goto out; + } em->generation = gen; clear_bit(EXTENT_FLAG_PINNED, &em->flags); -- 2.17.1