Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587996

Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode

From Mike Marshall <hubcap@omnibond.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode
Date 2017-02-25 00:10 +0100
Message-ID <tex9T-7mc-9@gated-at.bofh.it> (permalink)
References <tere9-2Ov-9@gated-at.bofh.it> <tet6h-4bt-9@gated-at.bofh.it> <tev85-5AX-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks Al... I was going to try and evaluate that patch next
week, now all I have to do is test it <g> ...

-Mike

On Fri, Feb 24, 2017 at 3:52 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> That, AFAICS, fixes a real bug.  Applied, and it needs Cc:stable as well.
>
>
>> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>> ---
>>  fs/orangefs/super.c |    9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> --- a/fs/orangefs/super.c
>> +++ b/fs/orangefs/super.c
>> @@ -115,6 +115,13 @@ static struct inode *orangefs_alloc_inod
>>       return &orangefs_inode->vfs_inode;
>>  }
>>
>> +static void orangefs_i_callback(struct rcu_head *head)
>> +{
>> +     struct inode *inode = container_of(head, struct inode, i_rcu);
>> +     struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
>> +     kmem_cache_free(orangefs_inode_cache, orangefs_inode);
>> +}
>> +
>>  static void orangefs_destroy_inode(struct inode *inode)
>>  {
>>       struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
>> @@ -123,7 +130,7 @@ static void orangefs_destroy_inode(struc
>>                       "%s: deallocated %p destroying inode %pU\n",
>>                       __func__, orangefs_inode, get_khandle_from_ino(inode));
>>
>> -     kmem_cache_free(orangefs_inode_cache, orangefs_inode);
>> +     call_rcu(&inode->i_rcu, orangefs_i_callback);
>>  }
>>
>>  /*
>>
>>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Peter Zijlstra <peterz@infradead.org> - 2017-02-24 19:50 +0100
  Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Al Viro <viro@ZenIV.linux.org.uk> - 2017-02-24 22:00 +0100
    Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Mike Marshall <hubcap@omnibond.com> - 2017-02-25 00:10 +0100
      Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Mike Marshall <hubcap@omnibond.com> - 2017-02-25 21:40 +0100
        Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Mike Marshall <hubcap@omnibond.com> - 2017-02-27 01:40 +0100
          Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-27 02:30 +0100
          Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode David Howells <dhowells@redhat.com> - 2017-02-27 10:00 +0100
            Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode Mike Marshall <hubcap@omnibond.com> - 2017-02-27 15:50 +0100

csiph-web