From: Gang He <ghe@suse.com>
To: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com
Cc: Gang He <ghe@suse.com>,
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: Fri, 17 Jul 2020 10:37:51 +0800 [thread overview]
Message-ID: <20200717023751.9922-1-ghe@suse.com> (raw)
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>
---
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;
}
--
2.12.3
WARNING: multiple messages have this Message-ID (diff)
From: Gang He <ghe@suse.com>
To: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com
Cc: Gang He <ghe@suse.com>,
linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
akpm@linux-foundation.org
Subject: [PATCH] ocfs2: fix remounting needed after setfacl command
Date: Fri, 17 Jul 2020 10:37:51 +0800 [thread overview]
Message-ID: <20200717023751.9922-1-ghe@suse.com> (raw)
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>
---
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;
}
--
2.12.3
next reply other threads:[~2020-07-17 2:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 2:37 Gang He [this message]
2020-07-17 2:37 ` [PATCH] ocfs2: fix remounting needed after setfacl command Gang He
2020-07-20 1:16 ` [Ocfs2-devel] " Joseph Qi
2020-07-20 1:16 ` Joseph Qi
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=20200717023751.9922-1-ghe@suse.com \
--to=ghe@suse.com \
--cc=akpm@linux-foundation.org \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.