mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 04:04:19 +00:00
ocfs2_find_match(): there's no such thing as NULL or negative ->d_parent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
3a1613672e
commit
fda4369104
@ -124,17 +124,10 @@ static int ocfs2_match_dentry(struct dentry *dentry,
|
|||||||
if (!dentry->d_fsdata)
|
if (!dentry->d_fsdata)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!dentry->d_parent)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (skip_unhashed && d_unhashed(dentry))
|
if (skip_unhashed && d_unhashed(dentry))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
parent = d_inode(dentry->d_parent);
|
parent = d_inode(dentry->d_parent);
|
||||||
/* Negative parent dentry? */
|
|
||||||
if (!parent)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Name is in a different directory. */
|
/* Name is in a different directory. */
|
||||||
if (OCFS2_I(parent)->ip_blkno != parent_blkno)
|
if (OCFS2_I(parent)->ip_blkno != parent_blkno)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user