mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] sysfs: fix sysfs_setattr
o sysfs_dirent's s_mode field should also be updated in sysfs_setattr(), else there could be inconsistency in the two fields. s_mode is used while ->readdir so as not to bring in the inode to cache. Signed-off-by: Maneesh Soni <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
bc062b1b5c
commit
9ca1eb3282
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue