From: J. Bruce Fields Date: Thu, 16 Jan 2014 22:17:31 +0000 (-0500) Subject: dcache: d_find_alias needn't recheck IS_ROOT && DCACHE_DISCONNECTED X-Git-Tag: firefly_0821_release~176^2~3412^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d80d7dabe9668965574669afbd31733f7b0fe9b;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Al Viro --- 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;