From patchwork Fri Sep 16 12:19:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 9335647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A43916077F for ; Fri, 16 Sep 2016 12:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FD7C29F28 for ; Fri, 16 Sep 2016 12:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F8F129F6F; Fri, 16 Sep 2016 12:20:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2098729F28 for ; Fri, 16 Sep 2016 12:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935042AbcIPMUb (ORCPT ); Fri, 16 Sep 2016 08:20:31 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38608 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934934AbcIPMT4 (ORCPT ); Fri, 16 Sep 2016 08:19:56 -0400 Received: by mail-wm0-f53.google.com with SMTP id 1so38176631wmz.1 for ; Fri, 16 Sep 2016 05:19:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KIfEmKvob7e0HzF9CSsv2CQurNUq97K5rGD5nJNNy2c=; b=QLff+kANq4DSqQD71un/xgsQfZk6U+2fN6eaiqoIy6pJoWezm/QlaupnpeMigA1cex d6vdPLbQ+cdj6R0RN3Plj+0BN7UYhqIMbgL3GvkCNBhKXyxa6mRhAGygOLLNf+uPF//f srbqIqSL8/T+MaO/Jum+Ji8bCfIZ9fPhtS+3IR2zYc1K07befnZmZ4j3W7id7SGBW8ds ZsCKNNsVR3jYRmbd+GrulYRt8sYZE1xFoCSzVjrL4WN00ChnXiFFN+3wASlnRWOOQTgx BlreLTnF5vnYDQoVvH8aHsC9I9+tK0/qPiVRnSDL3JWt0eY/ErGVckkiMlcQ3mWHg86l EtNw== X-Gm-Message-State: AE9vXwNfedPyb9lbed/2Xdn23eQjLHgysdI3jesUv9YQdd/qEGXip7zHeRppz9i3tWrohu8Q X-Received: by 10.28.152.206 with SMTP id a197mr7519004wme.21.1474028389766; Fri, 16 Sep 2016 05:19:49 -0700 (PDT) Received: from veci.piliscsaba.szeredi.hu (4E5CE698.dsl.pool.telekom.hu. [78.92.230.152]) by smtp.gmail.com with ESMTPSA id n7sm8169812wjs.34.2016.09.16.05.19.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 05:19:48 -0700 (PDT) From: Miklos Szeredi To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Al Viro , Andreas Gruenbacher Subject: [PATCH 10/12] posix_acl: don't ignore return value of posix_acl_create_masq() Date: Fri, 16 Sep 2016 14:19:29 +0200 Message-Id: <1474028371-21288-11-git-send-email-mszeredi@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1474028371-21288-1-git-send-email-mszeredi@redhat.com> References: <1474028371-21288-1-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Miklos Szeredi Cc: Andreas Gruenbacher Reviewed-by: Andreas Gruenbacher --- fs/posix_acl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 59d47ab0791a..ea3eb6f3bf1e 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -598,13 +598,14 @@ posix_acl_create(struct inode *dir, umode_t *mode, if (IS_ERR(p)) return PTR_ERR(p); + ret = -ENOMEM; clone = posix_acl_clone(p, GFP_NOFS); if (!clone) - goto no_mem; + goto err_release; ret = posix_acl_create_masq(clone, mode); if (ret < 0) - goto no_mem_clone; + goto err_release_clone; if (ret == 0) posix_acl_release(clone); @@ -618,11 +619,11 @@ posix_acl_create(struct inode *dir, umode_t *mode, return 0; -no_mem_clone: +err_release_clone: posix_acl_release(clone); -no_mem: +err_release: posix_acl_release(p); - return -ENOMEM; + return ret; } EXPORT_SYMBOL_GPL(posix_acl_create);