Skip to content

Commit f12ec44

Browse files
szmiLinus Torvalds
authored andcommitted
[PATCH] fuse: clean up dead code related to nfs exporting
Remove last remains of NFS exportability support. The code is actually buggy (as reported by Akshat Aranya), since 'alias' will be leaked if it's non-null and alias->d_flags has DCACHE_DISCONNECTED. This is not an active bug, since there will never be any disconnected dentries. But it's better to get rid of the unnecessary complexity anyway. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 15d2bac commit f12ec44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/fuse/dir.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,13 +741,14 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
741741
if (inode && S_ISDIR(inode->i_mode)) {
742742
/* Don't allow creating an alias to a directory */
743743
struct dentry *alias = d_find_alias(inode);
744-
if (alias && !(alias->d_flags & DCACHE_DISCONNECTED)) {
744+
if (alias) {
745745
dput(alias);
746746
iput(inode);
747747
return ERR_PTR(-EIO);
748748
}
749749
}
750-
return d_splice_alias(inode, entry);
750+
d_add(entry, inode);
751+
return NULL;
751752
}
752753

753754
static int fuse_setxattr(struct dentry *entry, const char *name,

0 commit comments

Comments
 (0)