diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-05-16 16:51:25 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-05-31 11:06:11 +0200 |
commit | 95a1c8153ad8bc99e7c4b90257f20b4f0474a9a0 (patch) | |
tree | da1fadaf2b5e9c96cab3225e596641595f0600ad /fs/overlayfs/super.c | |
parent | ovl: struct cattr cleanups (diff) | |
download | linux-95a1c8153ad8bc99e7c4b90257f20b4f0474a9a0.tar.xz linux-95a1c8153ad8bc99e7c4b90257f20b4f0474a9a0.zip |
ovl: return dentry from ovl_create_real()
Al Viro suggested to simplify callers of ovl_create_real() by
returning the created dentry (or ERR_PTR) from ovl_create_real().
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 286d36772e9c..704b37311467 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -611,9 +611,10 @@ retry: goto retry; } - err = ovl_create_real(dir, work, OVL_CATTR(attr.ia_mode)); - 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: |