Commit c9cc8d0f authored by Bruno Faccini's avatar Bruno Faccini Committed by Greg Kroah-Hartman

staging/lustre/llite: lock i_lock before __d_drop()

There has been several Lustre Client crashes reported by sites
running with Lustre versions 2.1/2.5, all showing the same
dentry->d_hash->next corrupted pointer cause.

This patch fixes a regression that has been introduced since a
long time by commit :
(LU-506 kernel: FC15 - support dcache scalability changes.)

where i_lock protection usage has been removed and
that is likely to cause racy condition during dentry [un]hashing
and to be the root cause of these crashes.
Signed-off-by: default avatarBruno Faccini <>
Intel-bug-id: default avatarLai Siyao <>
Reviewed-by: default avatarYang Sheng <>
Signed-off-by: default avatarOleg Drokin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 2bbec0ed
......@@ -2963,8 +2963,11 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
* here to preserve get_cwd functionality on 2.6.
* Bug 10503
if (!d_inode(dentry)->i_nlink)
if (!d_inode(dentry)->i_nlink) {
d_lustre_invalidate(dentry, 0);
ll_lookup_finish_locks(&oit, inode);
} else if (!ll_have_md_lock(d_inode(dentry), &ibits, LCK_MINMODE)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment