diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 8de13bafaa76732ec184733ebef14cfd4c79e546..d727dc960634a28de3df914ccb26cdc63fac98a9 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -85,7 +85,7 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID)) mode &= ~S_ISGID; - sd_iattr->ia_mode = mode; + sd_iattr->ia_mode = sd->s_mode = mode; } return error;