Re: [PATCH 11/12] fscache: Fix fscache_cookie_put() to not deref after dec

From
David Howells <dhowells@redhat.com>
Date
2021-08-25 14:06:03
Also in
ceph-devel, linux-fsdevel, linux-nfs, lkml
Reply to
Jeff Layton, 2021-08-24
Jeff Layton [off-list ref] wrote:
quoted
fscache_cookie_put() accesses the cookie it has just put inside the
tracepoint that monitors the change - but this is something it's not
allowed to do if we didn't reduce the count to zero.
Do you mean "if the count went to zero." ?
No.  If *we* reduced the count to zero, it falls to us to destroy the object,
so we're allowed to look into it again.

If we didn't reduce the count to zero, then someone else might destroy it
before we look into it again.

David
Thread (20 messages) 20 messages, 3 authors, last reply 2021-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help