Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1587937
| Path | csiph.com!news.redatomik.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Al Viro <viro@ZenIV.linux.org.uk> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 07/10] orangefs: Use RCU for destroy_inode |
| Date | Fri, 24 Feb 2017 22:00:01 +0100 |
| Message-ID | <tev85-5AX-7@gated-at.bofh.it> (permalink) |
| References | <tere9-2Ov-9@gated-at.bofh.it> <tet6h-4bt-9@gated-at.bofh.it> |
| X-Original-To | Peter Zijlstra <peterz@infradead.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.7.1 (2016-10-04) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Linus Torvalds <torvalds@linux-foundation.org>, Chris Mason <clm@fb.com>, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, David Howells <dhowells@redhat.com>, elena.reshetova@intel.com, ishkamiel@gmail.com, dwindsor@gmail.com, gregkh@linuxfoundation.org |
| X-Original-Date | Fri, 24 Feb 2017 20:52:22 +0000 |
| X-Original-Message-ID | <20170224205222.GP29622@ZenIV.linux.org.uk> |
| X-Original-References | <20170224154329.478276481@infradead.org> <20170224162044.333662852@infradead.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1587937 |
Show key headers only | View raw
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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