aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fscache/cookie.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
index 432482edc738..b1870a6c2cd3 100644
--- a/fs/fscache/cookie.c
+++ b/fs/fscache/cookie.c
@@ -437,12 +437,8 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
437 437
438 event = retire ? FSCACHE_OBJECT_EV_RETIRE : FSCACHE_OBJECT_EV_RELEASE; 438 event = retire ? FSCACHE_OBJECT_EV_RETIRE : FSCACHE_OBJECT_EV_RELEASE;
439 439
440 /* detach pointers back to the netfs */
441 spin_lock(&cookie->lock); 440 spin_lock(&cookie->lock);
442 441
443 cookie->netfs_data = NULL;
444 cookie->def = NULL;
445
446 /* break links with all the active objects */ 442 /* break links with all the active objects */
447 while (!hlist_empty(&cookie->backing_objects)) { 443 while (!hlist_empty(&cookie->backing_objects)) {
448 object = hlist_entry(cookie->backing_objects.first, 444 object = hlist_entry(cookie->backing_objects.first,
@@ -465,6 +461,10 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
465 BUG(); 461 BUG();
466 } 462 }
467 463
464 /* detach pointers back to the netfs */
465 cookie->netfs_data = NULL;
466 cookie->def = NULL;
467
468 spin_unlock(&cookie->lock); 468 spin_unlock(&cookie->lock);
469 469
470 if (cookie->parent) { 470 if (cookie->parent) {