Message ID | 20101203223326.GB28763@fieldses.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/fs/dcache.c b/fs/dcache.c index 23702a9..afa8a0d 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -368,7 +368,7 @@ static struct dentry * __d_find_alias(struct inode *inode, int want_discon) next = tmp->next; prefetch(next); alias = list_entry(tmp, struct dentry, d_alias); - if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { + if (S_ISDIR(inode->i_mode) || !inode->i_nlink || !d_unhashed(alias)) { if (IS_ROOT(alias) && (alias->d_flags & DCACHE_DISCONNECTED)) discon_alias = alias;