lkml.org 
[lkml]   [2021]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 1/9] ext4: Switch to kvfree_rcu() API
    + linux-ext4@vger.kernel.org

    On Wed, Nov 24, 2021 at 12:03 PM Uladzislau Rezki (Sony)
    <urezki@gmail.com> wrote:
    >
    > From: Uladzislau Rezki <uladzislau.rezki@sony.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@mit.edu>
    > Signed-off-by: Uladzislau Rezki <uladzislau.rezki@sony.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

    \
     
     \ /
      Last update: 2021-12-08 15:36    [W:3.416 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site