diff options
-rw-r--r-- | fs/fuse/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 29f1e9f6e85c..70dba721acab 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -741,13 +741,14 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, | |||
741 | if (inode && S_ISDIR(inode->i_mode)) { | 741 | if (inode && S_ISDIR(inode->i_mode)) { |
742 | /* Don't allow creating an alias to a directory */ | 742 | /* Don't allow creating an alias to a directory */ |
743 | struct dentry *alias = d_find_alias(inode); | 743 | struct dentry *alias = d_find_alias(inode); |
744 | if (alias && !(alias->d_flags & DCACHE_DISCONNECTED)) { | 744 | if (alias) { |
745 | dput(alias); | 745 | dput(alias); |
746 | iput(inode); | 746 | iput(inode); |
747 | return ERR_PTR(-EIO); | 747 | return ERR_PTR(-EIO); |
748 | } | 748 | } |
749 | } | 749 | } |
750 | return d_splice_alias(inode, entry); | 750 | d_add(entry, inode); |
751 | return NULL; | ||
751 | } | 752 | } |
752 | 753 | ||
753 | static int fuse_setxattr(struct dentry *entry, const char *name, | 754 | static int fuse_setxattr(struct dentry *entry, const char *name, |