diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index 15e06fb552da0f0ae73d07dbf9d733f1880918cb..b5254378f0113ca28d98c793a61528f62ea6f122 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c @@ -122,8 +122,7 @@ static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, if (S_ISREG(inode->i_mode)) HFSPLUS_I(inode)->linkid = linkid; out: - d_add(dentry, inode); - return NULL; + return d_splice_alias(inode, dentry); fail: hfs_find_exit(&fd); return ERR_PTR(err);