diff options
author | Hyunchul Lee <cheol.lee@lge.com> | 2018-07-19 02:23:57 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-08-01 20:52:36 +0200 |
commit | 5d3ce4f70172160625e9c18600fa3b929781c4fd (patch) | |
tree | f1b937b2644c37b90312a4445d53f17e8ec4d75e /fs/f2fs/xattr.c | |
parent | f2fs: fix to propagate error from __get_meta_page() (diff) | |
download | linux-5d3ce4f70172160625e9c18600fa3b929781c4fd.tar.xz linux-5d3ce4f70172160625e9c18600fa3b929781c4fd.zip |
f2fs: avoid duplicated permission check for "trusted." xattrs
Because xattr_permission already checks CAP_SYS_ADMIN
capability, we don't need to check it.
Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 708271871f94..4b34244dcc69 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -37,9 +37,6 @@ static int f2fs_xattr_generic_get(const struct xattr_handler *handler, return -EOPNOTSUPP; break; case F2FS_XATTR_INDEX_TRUSTED: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - break; case F2FS_XATTR_INDEX_SECURITY: break; default: @@ -62,9 +59,6 @@ static int f2fs_xattr_generic_set(const struct xattr_handler *handler, return -EOPNOTSUPP; break; case F2FS_XATTR_INDEX_TRUSTED: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - break; case F2FS_XATTR_INDEX_SECURITY: break; default: |