“58da10bb3fe680a197e83d5eccb5265a721c98e2”上不存在“git@gitcode.net:openanolis/cloud-kernel.git”
提交 9ca1eb32 编写于 作者: M Maneesh Soni 提交者: Linus Torvalds

[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: NManeesh Soni <maneesh@in.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 bc062b1b
...@@ -85,7 +85,7 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) ...@@ -85,7 +85,7 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID)) if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
mode &= ~S_ISGID; mode &= ~S_ISGID;
sd_iattr->ia_mode = mode; sd_iattr->ia_mode = sd->s_mode = mode;
} }
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部