diff mbox series

[514/622] lustre: llite: Don't clear d_fsdata in ll_release()

Message ID 1582838290-17243-515-git-send-email-jsimmons@infradead.org
State New, archived
Headers show
Series lustre: sync closely to 2.13.52 | expand

Commit Message

James Simmons Feb. 27, 2020, 9:16 p.m. UTC
From: NeilBrown <neilb@suse.de>

The whole point of using rcu_free() is that some code might
still be accessing the dentry (e.g. lockless lookup) and so
the dentry cannot be freed until the end of the grace

As lockless lookup can accesses d_fsdata -- ll_dcompare calls
d_lustre_invalid() -- we also mustn't clear d_fsdata before
the end of the grace period.
We don't need to clear it at all - by the time it is freed,
the inode will no longer be accessed.

Fixes: 7126bc2e8d60c ("lustre: switch to use of ->d_init()")

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradaed.org>
 fs/lustre/llite/dcache.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series


diff --git a/fs/lustre/llite/dcache.c b/fs/lustre/llite/dcache.c
index 2dfe12a..3230d32 100644
--- a/fs/lustre/llite/dcache.c
+++ b/fs/lustre/llite/dcache.c
@@ -63,7 +63,6 @@  static void ll_release(struct dentry *de)
-	de->d_fsdata = NULL;
 	call_rcu(&lld->lld_rcu_head, free_dentry_data);