Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp22907lfe; Fri, 15 Apr 2022 17:37:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/yRVn1AqFgZAzzdJsxVXAckJc7HUWWLPY/CG9sOhjiLiYm40Aew27OvnGknmAEW/36sLL X-Received: by 2002:a65:6cc8:0:b0:382:1b18:56a9 with SMTP id g8-20020a656cc8000000b003821b1856a9mr1134541pgw.347.1650069468256; Fri, 15 Apr 2022 17:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069468; cv=none; d=google.com; s=arc-20160816; b=bZZAGu8+ciVvYoYVQ7o48yEZaN8c/CYtQxwbCMTWNbt5UVc1bbzo//QKCTZ7A/qild TrHrpPcSAi79zBGx7WlU0P8HBi3yjxH09NxK9DfoBI36+RRvevXFXefmzXVqMM2U35ir 1nZvDuNlGZn3NNmN0DGVPpUPwiQYHaesdJprs7pBwK57XWXJqiVjwuLP4WzwSyLr9Hda +AchsI7BrUibm49ugDe1oOYgqJY2aOmUOgIQ2fifvzkSXyZpV3J0GfrvBmRYN44LLUwv Ql/Ek4VazXHlJfzxprQdzN/HIsfpGBs7urExGp2eiweqaow7NDQB0V42th0G/aFZMiEW 4fRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7krNVv0p3+9I1IJ2ob2IpWEJtnE8gMFshxhEHEbwVi0=; b=pggZaTaEqpSZ+XA0agrPdrVh2DlOhK4W0QRWZs6I9Pz1QSCI4kMYdndceLSLXMW4sC suEzWUiax9JQQbuI5KJOxoqQM4S53CF/toEuNx7jhwJpR2cXOuyLHuBl2StlbsmLX44p JNc0FfuBeGsQFBO6UIGaU/x4//U4B2DIA82bvFE4omBKFU5t/ldDxuWXJvwhX5UJxs8y 9LgVAF/9h/qV81n0gC1k05zvIIKlxeHiAXhDVD0oi2IxZSYkOBmt5eyQp2kVhikLvMNl v+e+6ITrm6CofkfgGW/AL2vel4/V1T9N4rhaVcd4O5HTZgsE9qDidorcBaM1/IPJCGAF SF1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJvO+I+k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n8-20020a170902e54800b00156c1fb5366si2667451plf.539.2022.04.15.17.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:37:48 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJvO+I+k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A87D5F5A; Fri, 15 Apr 2022 17:33:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238474AbiDOGI3 (ORCPT + 99 others); Fri, 15 Apr 2022 02:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbiDOGI2 (ORCPT ); Fri, 15 Apr 2022 02:08:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E061AAB6A for ; Thu, 14 Apr 2022 23:06:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CDC48B82C38 for ; Fri, 15 Apr 2022 06:05:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E7C1C385A5; Fri, 15 Apr 2022 06:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650002757; bh=9EJhFefwP87g2Uo3Oggk8GnCc1MvRsQNaYRMX+E6OlI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nJvO+I+kj0S28xHKtAtzlaDSeUgXcZ6vY7yXZdc/I7E2R70uRoE2BMsXVX58+Q58x BGhdCFyT8dsdwesoXTxMh4tRo298oG3419M4ussseOy8xQdpzzQuhKX8LhQFkjSnnt UoW+2i6zPFW0HfPFmm1lmde3ZrAnstA9FUAqO6xDWhzPMCOUJnflapK0LFUdpIDOjH SQmLkbA9ThmO6M6dXAnPKJ97F7sr3Vg8aTbXmPqZpIwyOVsmLT55sDm5Dn1Hd5JgG6 e+JAABNTasxIHVzld23/0w3TMUtTF6hFwJG4vd7Tm8HZ9fdCNu/kzcEV+P3pDLqBgk TqKJmb3hJ1e2w== Message-ID: Date: Fri, 15 Apr 2022 14:05:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2 1/2] f2fs: Remove usage of list iterator pas the loop for list_move_tail() Content-Language: en-US To: Jakob Koschel , Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." References: <20220412122040.3555423-1-jakobkoschel@gmail.com> From: Chao Yu In-Reply-To: <20220412122040.3555423-1-jakobkoschel@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 2022/4/12 20:20, Jakob Koschel wrote: > In preparation to limit the scope of a list iterator to the list > traversal loop, the usage of the list iterator variable 'next' should > be avoided past the loop body [1]. > > Instead of calling list_move_tail() on 'next' after the loop, it is > called within the loop if the correct location was found. > After the loop it covers the case if no location was found and it > should be inserted based on the 'head' of the list. > > Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ > Signed-off-by: Jakob Koschel Reviewed-by: Chao Yu Thanks,