Skip to content

Commit b33c14c

Browse files
author
Al Viro
committed
Merge branch 'no-rebase-overlayfs' into work.dcache-misc
2 parents 698f1e2 + 484d4fb commit b33c14c

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

fs/overlayfs/export.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb,
289289
{
290290
struct dentry *lower = lowerpath ? lowerpath->dentry : NULL;
291291
struct dentry *upper = upper_alias ?: index;
292-
struct dentry *dentry;
293292
struct inode *inode = NULL;
294293
struct ovl_entry *oe;
295294
struct ovl_inode_params oip = {
@@ -320,27 +319,7 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb,
320319
if (upper)
321320
ovl_set_flag(OVL_UPPERDATA, inode);
322321

323-
dentry = d_find_any_alias(inode);
324-
if (dentry)
325-
goto out_iput;
326-
327-
dentry = d_alloc_anon(inode->i_sb);
328-
if (unlikely(!dentry))
329-
goto nomem;
330-
331-
if (upper_alias)
332-
ovl_dentry_set_upper_alias(dentry);
333-
334-
ovl_dentry_init_reval(dentry, upper, OVL_I_E(inode));
335-
336-
return d_instantiate_anon(dentry, inode);
337-
338-
nomem:
339-
dput(dentry);
340-
dentry = ERR_PTR(-ENOMEM);
341-
out_iput:
342-
iput(inode);
343-
return dentry;
322+
return d_obtain_alias(inode);
344323
}
345324

346325
/* Get the upper or lower dentry in stack whose on layer @idx */

0 commit comments

Comments
 (0)