From: Al Viro Date: Sat, 9 May 2026 16:30:19 +0000 (-0400) Subject: ntfs: use d_splice_alias() for ->lookup() return value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02975a536d4b1bb304c6c7e35ce0c861566c7af8;p=thirdparty%2Fkernel%2Flinux.git ntfs: use d_splice_alias() for ->lookup() return value Reviewed-by: Namjae Jeon Signed-off-by: Al Viro --- diff --git a/fs/ntfs/namei.c b/fs/ntfs/namei.c index c4f82846c58c3..3e21753b9f886 100644 --- a/fs/ntfs/namei.c +++ b/fs/ntfs/namei.c @@ -230,9 +230,8 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, if (MREF_ERR(mref) == -ENOENT) { ntfs_debug("Entry was not found, adding negative dentry."); /* The dcache will handle negative entries. */ - d_add(dent, NULL); ntfs_debug("Done."); - return NULL; + return d_splice_alias(NULL, dent); } ntfs_error(vol->sb, "ntfs_lookup_ino_by_name() failed with error code %i.", -MREF_ERR(mref));