Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d80d7da authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Al Viro
Browse files

dcache: d_find_alias needn't recheck IS_ROOT && DCACHE_DISCONNECTED



If we get to this point and discover the dentry is not a root dentry, or
not DCACHE_DISCONNECTED--great, we always prefer that anyway.

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 52ed46f0
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -765,13 +765,10 @@ static struct dentry *__d_find_alias(struct inode *inode)
		alias = discon_alias;
		spin_lock(&alias->d_lock);
		if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) {
			if (IS_ROOT(alias) &&
			    (alias->d_flags & DCACHE_DISCONNECTED)) {
			__dget_dlock(alias);
			spin_unlock(&alias->d_lock);
			return alias;
		}
		}
		spin_unlock(&alias->d_lock);
		goto again;
	}