staging/lustre/llite: changes to avoid cache corruption
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@seagate.com> Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com> Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com> Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com> Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@seagate.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@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8d897d2540
commit
f736814418
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user