fs: use consistent setgid checks in is_sxid()
[platform/kernel/linux-starfive.git] / include / linux / fs.h
index b39c5ef..0a96f5e 100644 (file)
@@ -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,