From: Chengguang Xu Date: Mon, 9 Jul 2018 14:48:07 +0000 (+0800) Subject: ceph: return errors from posix_acl_equiv_mode() correctly X-Git-Tag: v4.19-rc1~76^2~30 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=61ad36d47dd273b7b8c3d63fc8359d96f7976c79;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 3351ea14390bf..027408d55aeed 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; }