From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0392C43381 for ; Wed, 10 Feb 2021 18:21:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7441C64ED7 for ; Wed, 10 Feb 2021 18:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234074AbhBJSUu (ORCPT ); Wed, 10 Feb 2021 13:20:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:52012 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234162AbhBJSSc (ORCPT ); Wed, 10 Feb 2021 13:18:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4A113AB98; Wed, 10 Feb 2021 18:17:49 +0000 (UTC) Subject: Re: [v7 PATCH 06/12] mm: vmscan: add shrinker_info_protected() helper To: Yang Shi , guro@fb.com, ktkhai@virtuozzo.com, shakeelb@google.com, david@fromorbit.com, hannes@cmpxchg.org, mhocko@suse.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210209174646.1310591-1-shy828301@gmail.com> <20210209174646.1310591-7-shy828301@gmail.com> From: Vlastimil Babka Message-ID: Date: Wed, 10 Feb 2021 19:17:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210209174646.1310591-7-shy828301@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 2/9/21 6:46 PM, Yang Shi wrote: > The shrinker_info is dereferenced in a couple of places via rcu_dereference_protected > with different calling conventions, for example, using mem_cgroup_nodeinfo helper > or dereferencing memcg->nodeinfo[nid]->shrinker_info. And the later patch > will add more dereference places. > > So extract the dereference into a helper to make the code more readable. No > functional change. > > Signed-off-by: Yang Shi Acked-by: Vlastimil Babka