diff options
author | ZhangZhen <zhenzhang.zhang@huawei.com> | 2014-04-04 03:47:16 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-07 05:18:30 +0200 |
commit | 3a8861e2715e3b985bfaac43bcdfcfebe9b423cb (patch) | |
tree | 270d3c32b81c3bc2321b1d21a8162abe6c586d28 /fs/f2fs | |
parent | f2fs: introduce f2fs_issue_flush to avoid redundant flush issue (diff) | |
download | linux-3a8861e2715e3b985bfaac43bcdfcfebe9b423cb.tar.xz linux-3a8861e2715e3b985bfaac43bcdfcfebe9b423cb.zip |
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 <zhenzhang.zhang@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/acl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index a28571528f24..e93e4ec7d165 100644 --- a/fs/f2fs/acl.c +++ b/fs/f2fs/acl.c @@ -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; |