summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-01-16 17:17:31 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-08-07 14:40:10 -0400
commit8d80d7dabe9668965574669afbd31733f7b0fe9b (patch)
tree198a37bc2a9a0b89639ed0107eb02853240f544c /fs/dcache.c
parent52ed46f0fa88243887b823d24ccb9fcf47a735b3 (diff)
downloadlinux-8d80d7dabe9668965574669afbd31733f7b0fe9b.tar.bz2
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: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 5c5f3bd9af5f..85a2aad3dcb3 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -765,12 +765,9 @@ again:
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;
- }
+ __dget_dlock(alias);
+ spin_unlock(&alias->d_lock);
+ return alias;
}
spin_unlock(&alias->d_lock);
goto again;