]> git.baikalelectronics.ru Git - kernel.git/commit
FS-Cache: Clear netfs pointers in cookie after detaching object, not before
authorDavid Howells <dhowells@redhat.com>
Thu, 19 Nov 2009 18:11:11 +0000 (18:11 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 19 Nov 2009 18:11:11 +0000 (18:11 +0000)
commitac055bb2639ea478dc314f430c834a6296d828da
tree96c766e56e73df02a430bc0df72066413838fed0
parent981f00c965099d46cb721f3002d16d6282f02181
FS-Cache: Clear netfs pointers in cookie after detaching object, not before

Clear the pointers from the fscache_cookie struct to netfs private data after
clearing the pointer to the cookie from the fscache_object struct and
releasing the object lock, rather than before.

This allows the netfs private data pointers to be relied on simply by holding
the object lock, rather than having to hold the cookie lock.  This is makes
things simpler as the cookie lock has to be taken before the object lock, but
sometimes the object pointer is all that the code has.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/fscache/cookie.c