Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2323186rwd; Wed, 14 Jun 2023 00:51:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5C8FwZybPJR+xwvrov3vmQJ90L20U1UJLvEVRPclve6bMlB1Ff0X8R0JyCwE+k/Xqx08a0 X-Received: by 2002:a05:6402:705:b0:514:9e91:f54 with SMTP id w5-20020a056402070500b005149e910f54mr8931831edx.26.1686729077017; Wed, 14 Jun 2023 00:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686729077; cv=none; d=google.com; s=arc-20160816; b=BlxQ+9oEU5qIy61mRcC1qslKUA0vE9U+WHdn4dxAIN2xCoWa2GvjOAXK17TNeqj4t2 GG5ulm3tEsJ6uoRR7Zo1Htn/wJGi7sGuUHOj738uQbw0bKu66XZuUWxRc1/WbUaFjmcr 5HRinWz3ilDUVuM2eburw8opZHuLbHc+XEd4A8pFF5NsN7BquJbKmPkqZR94ApgtMpVJ nIe5s/DYgoyXxdLFACmlTzsqrZIS9knaA9A4RMMgmeq6PCGRCbT96CMTOAGGjR/yhPbd MBnkee171gE9JCX1Uwa/+bWAijBxnu4FzA7wA7bPjWRnUDR10lu5abB4kV4dvGDkWPkc 2fgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=s+d1aDvYydhoVYAlf+pG2VChzYoXZEeeWgwvE+blhCE=; b=zh2RgsPMjKLrUE4I9Dy2Pntti6XHSrjiLita2r12CGqo44iFAipXD4r5d6Ro/M3cWb yL5nYD8DiPeMn5gJy10hR6B/XOUMeJ/F/tHVqDNyeOpQ/PjDKJZC5OKTImKS1+c2mzRj f7hx+aao1UdEOAIUmu0wiH9xETwlF3RSNRXJMOSOoKm3f/5DnVKAXQUvhBbXQVoS6Yme RXdqnmSxfVmRUrlHg04FvHmc+17VE8t/mc40hv+a13BZMlhkP6eIVF4W11DUk8nOfj9o kQzImvLvRzwbksp0sy55jJtTLPNtYU6uURpSS9JtsY2vqhka+hDRMVKKAVgWruuknfLD gxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.com header.s=s31663417 header.b=XFSpc6e+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020aa7c508000000b0051873de728bsi1966596edq.581.2023.06.14.00.50.50; Wed, 14 Jun 2023 00:51:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.com header.s=s31663417 header.b=XFSpc6e+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243106AbjFNHgz (ORCPT + 99 others); Wed, 14 Jun 2023 03:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243225AbjFNHgp (ORCPT ); Wed, 14 Jun 2023 03:36:45 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A365326A6; Wed, 14 Jun 2023 00:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.com; s=s31663417; t=1686728143; x=1687332943; i=quwenruo.btrfs@gmx.com; bh=S9LtiaIQe1KHAB/mdGv50YAXRAYL6f2p6uj/VL1tokA=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=XFSpc6e+IvmeC0Q2GnckhWoYKwIHaHDswPg2QhDtznLajp6IoeAWWvGXwwUn+7RjvPWmcao t78LSp+5nL1841t6SUiTXDJsMnCAc9s3MG6sw/aUH5zl5vO3GIDVN2XaBPgDUo45E6iW0NyUZ gCBnF+dZ9AO/rHKkByp03mrtamitsQyFG7HVMeA4zIaQw8vkBEMfmGE9HeH5Ik7Bu7/KwV3Qp ZJxV1zM6q6wUlcu/WerhDsz5yA9+PLxLAqhFhgWlvdkDtEyOO9ePT4reVLJF2cfQuMIN6a4sp ROOELvM4qXezrodCQRWUOwPF7dEG2esclWVciui0hG27RzQ5MJEA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MN5if-1qRghn0YJZ-00J4GZ; Wed, 14 Jun 2023 09:35:42 +0200 Message-ID: <146b71c3-2ce3-acb1-2580-96bd9b80546f@gmx.com> Date: Wed, 14 Jun 2023 15:35:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] btrfs: make unpin_extent_cache return void Content-Language: en-US To: baomingtong001@208suo.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230614072710.34392-1-luojianhong@cdjrlc.com> From: Qu Wenruo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:eWE7qtlogYOaXjLxxc1HdnYv5hRsL6I0HbFETHTY/HQwfuXmM1U QqZ/7SYMlQx1GfODZ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jMJ0IRqWNL98JZZcNmHToNu2 vl+Vlh/8aDSQ+rQ4f3DMP0ZVYvg9feP9vm8JtWhQRIBC9m8zrXKntwPw6UAM/RwGQrj0jj+oZ yUEFdfcs1JSwHm3xUSBmtFtLxGA= X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/6/14 15:29, baomingtong001@208suo.com wrote: > The return value of unpin_extent_cache is always 0, > and its caller does not check its return value. > > Signed-off-by: Mingtong Bao Reviewed-by: Qu Wenruo Thanks, Qu > --- > =C2=A0fs/btrfs/extent_map.c | 3 +-- > =C2=A0fs/btrfs/extent_map.h | 2 +- > =C2=A02 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c > index f3e9aaeb9956..845994b47998 100644 > --- a/fs/btrfs/extent_map.c > +++ b/fs/btrfs/extent_map.c > @@ -292,7 +292,7 @@ static void try_merge_map(struct extent_map_tree > *tree, struct extent_map *em) > =C2=A0 * to the generation that actually added the file item to the ino= de so > we know > =C2=A0 * we need to sync this extent when we call fsync(). > =C2=A0 */ > -int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len= , > +void unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 le= n, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 u64 gen) > =C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0 struct extent_map *em; > @@ -326,7 +326,6 @@ int unpin_extent_cache(struct extent_map_tree *tree, > u64 start, u64 len, > =C2=A0=C2=A0=C2=A0=C2=A0 free_extent_map(em); > =C2=A0out: > =C2=A0=C2=A0=C2=A0=C2=A0 write_unlock(&tree->lock); > -=C2=A0=C2=A0=C2=A0 return 0; > > =C2=A0} > > diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h > index 35d27c756e08..486a8ea798c7 100644 > --- a/fs/btrfs/extent_map.h > +++ b/fs/btrfs/extent_map.h > @@ -97,7 +97,7 @@ struct extent_map *alloc_extent_map(void); > =C2=A0void free_extent_map(struct extent_map *em); > =C2=A0int __init extent_map_init(void); > =C2=A0void __cold extent_map_exit(void); > -int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 > len, u64 gen); > +void unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 > len, u64 gen); > =C2=A0void clear_em_logging(struct extent_map_tree *tree, struct extent= _map > *em); > =C2=A0struct extent_map *search_extent_mapping(struct extent_map_tree *= tree, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 u64 start, u64 l= en);