[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1472051518-745466-7-git-send-email-green@linuxhacker.ru>
Date: Wed, 24 Aug 2016 11:11:56 -0400
From: Oleg Drokin <green@...uxhacker.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org,
Andreas Dilger <andreas.dilger@...el.com>,
James Simmons <jsimmons@...radead.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lustre Development List <lustre-devel@...ts.lustre.org>,
Lokesh Nagappa Jaliminche <lokesh.jaliminche@...gate.com>,
Oleg Drokin <green@...uxhacker.ru>
Subject: [PATCH v2 6/8] staging/lustre/llite: changes to avoid cache corruption
From: Lokesh Nagappa Jaliminche <lokesh.jaliminche@...gate.com>
ll_find_alias is responsible for getting alias for inode
which can be reused. Directories are assumed to have unique
alias, where in case of non-directories there can be multiple
aliases. In case of lustre there can be two type of aliases
i.e. discon_alias and invalid_alias. Usage of discon_alias in
case of non-directories may corrupt dcache and leads to kernel
crash. Changes made to avoid use of discon_alias in case of
non-directories.
Seagate-bug-id: MRP-2739, MRP-3601
Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@...gate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@...gate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@...gate.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@...gate.com>
Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@...gate.com>
Reviewed-on: http://review.whamcloud.com/17732
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7613
Reviewed-by: Niu Yawei <yawei.niu@...el.com>
Signed-off-by: Oleg Drokin <green@...uxhacker.ru>
---
drivers/staging/lustre/lustre/llite/namei.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 788a3f0..b7d448f 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -363,7 +363,8 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry)
LASSERT(alias != dentry);
spin_lock(&alias->d_lock);
- if (alias->d_flags & DCACHE_DISCONNECTED)
+ if ((alias->d_flags & DCACHE_DISCONNECTED) &&
+ S_ISDIR(inode->i_mode))
/* LASSERT(last_discon == NULL); LU-405, bz 20055 */
discon_alias = alias;
else if (alias->d_parent == dentry->d_parent &&
--
2.7.4
Powered by blists - more mailing lists