diff --git a/include/linux/fs.h b/include/linux/fs.h index b39c5efca180..0a96f5eeee69 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3527,7 +3527,7 @@ int __init list_bdev_fs_names(char *buf, size_t size); static inline bool is_sxid(umode_t mode) { - return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); + return mode & (S_ISUID | S_ISGID); } static inline int check_sticky(struct user_namespace *mnt_userns,