Skip to content

Commit 504ec37

Browse files
Gang Hetorvalds
authored andcommitted
ocfs2: fix remounting needed after setfacl command
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Joseph Qi <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Changwei Ge <[email protected]> Cc: Jun Piao <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 1146f7e commit 504ec37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/ocfs2/acl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ static int ocfs2_set_acl(handle_t *handle,
256256
ret = ocfs2_xattr_set(inode, name_index, "", value, size, 0);
257257

258258
kfree(value);
259+
if (!ret)
260+
set_cached_acl(inode, type, acl);
259261

260262
return ret;
261263
}

0 commit comments

Comments
 (0)