f2fs: Check the acl's validity before setting
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 f2fs: Check the acl's validity before setting
Before setting the acl, call posix_acl_valid() to check if it is valid or not.
Signed-off-by zhangzhen <[email protected]>
--- fs/f2fs/acl.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
fs/f2fs/acl.c +6 -0
@@ -203,6 +203,12 @@ static int __f2fs_set_acl(struct inode *inode, int type,size_t size =0 ;int error; +if (acl) { + error =posix_acl_valid (acl); +if (error <0 ) +return error; + } +switch (type) {case ACL_TYPE_ACCESS : name_index =F2FS_XATTR_INDEX_POSIX_ACL_ACCESS ;
Signature · 10 lines
1.6.0.2 . ------------------------------------------------------------------------------