summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r--fs/overlayfs/super.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index e8551c9..704b373 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -611,11 +611,10 @@ retry:
goto retry;
}
- err = ovl_create_real(dir, work,
- &(struct cattr){.mode = S_IFDIR | 0},
- NULL, true);
- if (err)
- goto out_dput;
+ work = ovl_create_real(dir, work, OVL_CATTR(attr.ia_mode));
+ err = PTR_ERR(work);
+ if (IS_ERR(work))
+ goto out_err;
/*
* Try to remove POSIX ACL xattrs from workdir. We are good if:
OpenPOWER on IntegriCloud