From patchwork Thu Oct 14 13:51:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1540939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=QSUeVU1k; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVW6l3wf6z9sPB for ; Fri, 15 Oct 2021 00:52:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mb19V-0004sK-CZ; Thu, 14 Oct 2021 13:52:09 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mb19U-0004rP-8Y for kernel-team@lists.ubuntu.com; Thu, 14 Oct 2021 13:52:08 +0000 Received: from mussarela.. (unknown [177.9.89.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 6C8EA3FFE6 for ; Thu, 14 Oct 2021 13:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1634219528; bh=cOgaC2uPnEigU6riqdAYYKuSq8Jet0oExOW1BNiOb1w=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QSUeVU1kMhR+963GyM9eCzPgoPlx2AXCgDgUw5tyhWQZ7fdaHyZs2CitkGDKWlwRj h/VNrr2pbvTeZnywvC3YMOekQxZXif0PyrAFbOVUNvsClKkauYj8niwvZr3i1fSzdH vtwGKnYMluAkIYbDCjnpeIo/Q5JVbNjQgGNAJH2KvAN1BfvOXe99XwXUjBfqdhDEuo kxNM95oNwuxvaOvdxuvh2/x97A9AYJ82IDX07zAOred3r7jDfLPA2sG6cCsPKMUpy9 6a9JEMyeGaImt+uKMhwU0enV5ZwTO5h92YQuIZ6wCZnOzok2GIe34Pi/FWuKvjuzyo 92pToYwBmzE6g== From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU Bionic/Focal 1/2] ocfs2: fix remounting needed after setfacl command Date: Thu, 14 Oct 2021 10:51:58 -0300 Message-Id: <20211014135159.45981-2-cascardo@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211014135159.45981-1-cascardo@canonical.com> References: <20211014135159.45981-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Gang He https://bugs.launchpad.net/bugs/1947161 When use setfacl command to change a file's acl, the user cannot get the latest acl information from the file via getfacl command, until remounting the file system. e.g. setfacl -m u:ivan:rw /ocfs2/ivan getfacl /ocfs2/ivan getfacl: Removing leading '/' from absolute path names file: ocfs2/ivan owner: root group: root user::rw- group::r-- mask::r-- other::r-- The latest acl record("u:ivan:rw") cannot be returned via getfacl command until remounting. Signed-off-by: Gang He Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Link: http://lkml.kernel.org/r/20200717023751.9922-1-ghe@suse.com Signed-off-by: Linus Torvalds (cherry picked from commit 504ec37dfdfbf9c65166c51f7b12126d2a9b18dc) Signed-off-by: Thadeu Lima de Souza Cascardo --- fs/ocfs2/acl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index bb981ec76456..7b07f5df3a29 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c @@ -256,6 +256,8 @@ static int ocfs2_set_acl(handle_t *handle, ret = ocfs2_xattr_set(inode, name_index, "", value, size, 0); kfree(value); + if (!ret) + set_cached_acl(inode, type, acl); return ret; }