diff options
| author | Youling Tang <tangyouling@kylinos.cn> | 2024-06-20 11:23:34 +0800 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-06-25 11:15:48 +0200 |
| commit | 8444ee22adb0c8b09ccf9c183bdf6d649d67ddda (patch) | |
| tree | 9f806a537f287fc4bd0bf577e62d77c0daef2038 /fs/f2fs/acl.c | |
| parent | fs: Export in_group_or_capable() (diff) | |
| download | linux-8444ee22adb0c8b09ccf9c183bdf6d649d67ddda.tar.gz linux-8444ee22adb0c8b09ccf9c183bdf6d649d67ddda.zip | |
f2fs: Use in_group_or_capable() helper
Use the in_group_or_capable() helper function to simplify the code.
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Link: https://lore.kernel.org/r/20240620032335.147136-2-youling.tang@linux.dev
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/f2fs/acl.c')
| -rw-r--r-- | fs/f2fs/acl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index ec2aeccb69a3..8bffdeccdbc3 100644 --- a/fs/f2fs/acl.c +++ b/fs/f2fs/acl.c @@ -219,8 +219,7 @@ static int f2fs_acl_update_mode(struct mnt_idmap *idmap, return error; if (error == 0) *acl = NULL; - if (!vfsgid_in_group_p(i_gid_into_vfsgid(idmap, inode)) && - !capable_wrt_inode_uidgid(idmap, inode, CAP_FSETID)) + if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) mode &= ~S_ISGID; *mode_p = mode; return 0; |
