[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2030919.1629900351@warthog.procyon.org.uk>
Date: Wed, 25 Aug 2021 15:05:51 +0100
From: David Howells <dhowells@...hat.com>
To: Jeff Layton <jlayton@...hat.com>
Cc: dhowells@...hat.com, linux-cachefs@...hat.com,
Anna Schumaker <anna.schumaker@...app.com>,
Steve French <sfrench@...ba.org>,
Dominique Martinet <asmadeus@...ewreck.org>,
David Wysochanski <dwysocha@...hat.com>,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-cifs@...r.kernel.org, ceph-devel@...r.kernel.org,
v9fs-developer@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/12] fscache: Fix fscache_cookie_put() to not deref after dec
Jeff Layton <jlayton@...hat.com> wrote:
> > 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
Powered by blists - more mailing lists