diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2026-05-09 19:28:48 +0300 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2026-06-05 08:12:15 +0300 |
| commit | 79b0c7204b04e6786b12fcdc3fd1c22cbabe5734 (patch) | |
| tree | 855a38f6ae3138267072c54389fe2b33426c025c | |
| parent | 0c23a964a0f9ce92f65e04c77b86437fbaeb229a (diff) | |
| download | linux-79b0c7204b04e6786b12fcdc3fd1c22cbabe5734.tar.xz | |
ecryptfs: use d_splice_alias() for ->lookup() return value
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | fs/ecryptfs/inode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 546c1fe692c0..7aaf1913f9c6 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -350,11 +350,9 @@ static struct dentry *ecryptfs_lookup_interpose(struct dentry *dentry, */ lower_inode = READ_ONCE(lower_dentry->d_inode); - if (!lower_inode) { - /* We want to add because we couldn't find in lower */ - d_add(dentry, NULL); - return NULL; - } + if (!lower_inode) /* We want to add because we couldn't find in lower */ + return d_splice_alias(NULL, dentry); + inode = __ecryptfs_get_inode(lower_inode, dentry->d_sb); if (IS_ERR(inode)) { printk(KERN_ERR "%s: Error interposing; rc = [%ld]\n", |
