[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+KHdyUvoB9bbm34=fJ8oi21=r0JEYfRw9R6HQRZ1obpBnaOHg@mail.gmail.com>
Date: Wed, 8 Dec 2021 15:36:09 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: LKML <linux-kernel@...r.kernel.org>, RCU <rcu@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>,
Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc: Michal Hocko <mhocko@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Daniel Axtens <dja@...ens.net>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <neeraju@...eaurora.org>,
Joel Fernandes <joel@...lfernandes.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Oleksiy Avramchenko <oleksiy.avramchenko@...ymobile.com>,
Uladzislau Rezki <uladzislau.rezki@...y.com>
Subject: Re: [PATCH 1/9] ext4: Switch to kvfree_rcu() API
+ linux-ext4@...r.kernel.org
On Wed, Nov 24, 2021 at 12:03 PM Uladzislau Rezki (Sony)
<urezki@...il.com> wrote:
>
> From: Uladzislau Rezki <uladzislau.rezki@...y.com>
>
> Instead of invoking a synchronize_rcu() to free a pointer
> after a grace period we can directly make use of new API
> that does the same but in more efficient way.
>
> CC: "Theodore Ts'o" <tytso@....edu>
> Signed-off-by: Uladzislau Rezki <uladzislau.rezki@...y.com>
> ---
> fs/ext4/super.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 4e33b5eca694..111b0498a232 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1886,8 +1886,7 @@ static int clear_qf_name(struct super_block *sb, int qtype)
> return -1;
> }
> rcu_assign_pointer(sbi->s_qf_names[qtype], NULL);
> - synchronize_rcu();
> - kfree(old_qname);
> + kvfree_rcu(old_qname);
> return 1;
> }
> #endif
> --
> 2.30.2
>
--
Uladzislau Rezki
Powered by blists - more mailing lists