Commit 4c2060a8 authored by Patrick Farrell's avatar Patrick Farrell Committed by Greg Kroah-Hartman

staging/lustre/llite: Anonymous dentry incorrectly identified as root

When exporting Lustre via NFS on SLES11SP2, this check incorrectly identifies
anonymous dentries as root dentries.  This is due to a change in SLES11SP2
which makes the d_name.name for anonymous dentries the same as that for root
dentries.  (Details in LU-3484.)

This changes the check to directly compare the value of the dentry pointer
to the root dentry pointer found in the superblock, rather than using the name.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3484
Lustre-change: http://review.whamcloud.com/6726Signed-off-by: default avatarPatrick Farrell <paf@cray.com>
Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarPeng Tao <bergwolf@gmail.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarAlexey Shvetsov <alexxy@gentoo.org>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb6a2db6
...@@ -295,9 +295,10 @@ void ll_invalidate_aliases(struct inode *inode) ...@@ -295,9 +295,10 @@ void ll_invalidate_aliases(struct inode *inode)
dentry->d_name.name, dentry, dentry->d_parent, dentry->d_name.name, dentry, dentry->d_parent,
dentry->d_inode, dentry->d_flags); dentry->d_inode, dentry->d_flags);
if (dentry->d_name.len == 1 && dentry->d_name.name[0] == '/') { if (unlikely(dentry == dentry->d_sb->s_root)) {
CERROR("called on root (?) dentry=%p, inode=%p " CERROR("%s: called on root dentry=%p, fid="DFID"\n",
"ino=%lu\n", dentry, inode, inode->i_ino); ll_get_fsname(dentry->d_sb, NULL, 0),
dentry, PFID(ll_inode2fid(inode)));
lustre_dump_dentry(dentry, 1); lustre_dump_dentry(dentry, 1);
dump_stack(); dump_stack();
} }
......
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