diff options
author | Al Viro <[email protected]> | 2023-11-18 16:22:44 -0500 |
---|---|---|
committer | Al Viro <[email protected]> | 2023-11-18 16:22:44 -0500 |
commit | b33c14c8618edfc00bf8963e3b0c8a2b19c9eaa4 (patch) | |
tree | 4d00c740d042d95e02ca27d03f1653aef7b0d329 | |
parent | 698f1e2b71736977b04f951e2e2ef1c9a80696ff (diff) | |
parent | 484d4fbfdafea581fdc2fd04df6781c3a59122c9 (diff) |
Merge branch 'no-rebase-overlayfs' into work.dcache-misc
-rw-r--r-- | fs/overlayfs/export.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 7e16bbcad95e..9e316d5f936e 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -289,7 +289,6 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb, { struct dentry *lower = lowerpath ? lowerpath->dentry : NULL; struct dentry *upper = upper_alias ?: index; - struct dentry *dentry; struct inode *inode = NULL; struct ovl_entry *oe; struct ovl_inode_params oip = { @@ -320,27 +319,7 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb, if (upper) ovl_set_flag(OVL_UPPERDATA, inode); - dentry = d_find_any_alias(inode); - if (dentry) - goto out_iput; - - dentry = d_alloc_anon(inode->i_sb); - if (unlikely(!dentry)) - goto nomem; - - if (upper_alias) - ovl_dentry_set_upper_alias(dentry); - - ovl_dentry_init_reval(dentry, upper, OVL_I_E(inode)); - - return d_instantiate_anon(dentry, inode); - -nomem: - dput(dentry); - dentry = ERR_PTR(-ENOMEM); -out_iput: - iput(inode); - return dentry; + return d_obtain_alias(inode); } /* Get the upper or lower dentry in stack whose on layer @idx */ |