From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Gang He <ghe@suse.com>, mark@fasheh.com, jlbec@evilplan.org
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
akpm@linux-foundation.org
Subject: [Ocfs2-devel] [PATCH] ocfs2: fix remounting needed after setfacl command
Date: Mon, 20 Jul 2020 09:16:35 +0800 [thread overview]
Message-ID: <3bcaf181-9a1a-e9d1-c41b-0dd1edc79d63@linux.alibaba.com> (raw)
In-Reply-To: <20200717023751.9922-1-ghe@suse.com>
On 2020/7/17 10:37, Gang He wrote:
> 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 <ghe@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> 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;
> }
>
prev parent reply other threads:[~2020-07-20 1:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 2:37 [Ocfs2-devel] [PATCH] ocfs2: fix remounting needed after setfacl command Gang He
2020-07-20 1:16 ` Joseph Qi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bcaf181-9a1a-e9d1-c41b-0dd1edc79d63@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=ghe@suse.com \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).