]> Git Repo - linux.git/commitdiff
ceph: return errors from posix_acl_equiv_mode() correctly
authorChengguang Xu <[email protected]>
Mon, 9 Jul 2018 14:48:07 +0000 (22:48 +0800)
committerIlya Dryomov <[email protected]>
Thu, 2 Aug 2018 19:26:12 +0000 (21:26 +0200)
In order to return correct error code should replace variable ret
using err in error case.

Signed-off-by: Chengguang Xu <[email protected]>
Reviewed-by: "Yan, Zheng" <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
fs/ceph/acl.c

index 3351ea14390bf3003af1d328608d9044913aaea6..027408d55aeed946c13fc42ded7e3146f5a5fffa 100644 (file)
@@ -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;
                }
This page took 0.055719 seconds and 4 git commands to generate.