Re: [PATCH RESEND] ext4: Switch to kvfree_rcu() API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 15, 2021 at 12:18:39PM +0100, Uladzislau Rezki (Sony) wrote:
> From: Uladzislau Rezki <uladzislau.rezki@xxxxxxxx>
> 
> 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.
> 
> TO: "Theodore Ts'o" <tytso@xxxxxxx>
> TO: linux-ext4@xxxxxxxxxxxxxxx
> Signed-off-by: Uladzislau Rezki <uladzislau.rezki@xxxxxxxx>
> ---
>  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
> 
+ "Theodore Ts'o" <tytso@xxxxxxx>
+ linux-ext4@xxxxxxxxxxxxxxx

--
Vlad Rezki



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux