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>
This commit is contained in:
Miklos Szeredi
2018-05-16 17:51:25 +03:00
parent 471ec5dcf4
commit 95a1c8153a
4 changed files with 40 additions and 48 deletions

View File

@@ -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: