From: David Woodhouse Date: Thu, 1 Nov 2007 20:27:38 +0000 (-0400) Subject: [JFFS2] Don't strip sgid bit from inode permissions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=857013b87b6e0fea776c1f0b365dbce3d6eba8c6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [JFFS2] Don't strip sgid bit from inode permissions dwmw2: anyway, removing sgid from directories or from files without S_IXGRP is a plain and simple bug these days you don't need that logics at all - simply remove it Signed-off-by: David Woodhouse --- diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index d2e06f7ea96..ee192af0b8b 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -97,11 +97,7 @@ int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) ri->gid = cpu_to_je16((ivalid & ATTR_GID)?iattr->ia_gid:inode->i_gid); if (ivalid & ATTR_MODE) - if (iattr->ia_mode & S_ISGID && - !in_group_p(je16_to_cpu(ri->gid)) && !capable(CAP_FSETID)) - ri->mode = cpu_to_jemode(iattr->ia_mode & ~S_ISGID); - else - ri->mode = cpu_to_jemode(iattr->ia_mode); + ri->mode = cpu_to_jemode(iattr->ia_mode); else ri->mode = cpu_to_jemode(inode->i_mode);