summaryrefslogtreecommitdiff
path: root/fs/ceph/acl.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-07-09 22:48:07 +0800
committerIlya Dryomov <idryomov@gmail.com>2018-08-02 21:26:12 +0200
commit61ad36d47dd273b7b8c3d63fc8359d96f7976c79 (patch)
tree8be6b20ec0f147ff09b554dbdfc57eded1ffda1b /fs/ceph/acl.c
parentdfeb84d4adfda0448b013b8aae2cc5c95eb27ccd (diff)
ceph: return errors from posix_acl_equiv_mode() correctly
In order to return correct error code should replace variable ret using err in error case. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/acl.c')
-rw-r--r--fs/ceph/acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c
index 3351ea14390b..027408d55aee 100644
--- a/fs/ceph/acl.c
+++ b/fs/ceph/acl.c
@@ -185,10 +185,10 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode,
return err;
if (acl) {
- int ret = posix_acl_equiv_mode(acl, mode);
- if (ret < 0)
+ err = posix_acl_equiv_mode(acl, mode);
+ if (err < 0)
goto out_err;
- if (ret == 0) {
+ if (err == 0) {
posix_acl_release(acl);
acl = NULL;
}