diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 07235caec22c6ef811af210aff63857c25f9dd56..a6619b7064b9e679b887d31ec85301d300c088f5 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt @@ -70,7 +70,7 @@ An attribute definition is simply: struct attribute { char * name; struct module *owner; - mode_t mode; + umode_t mode; }; diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 120c3adff6b077600dea72bd22d7e2b5852a6688..62f4fb37789e0f5b634c44b7adc782d1c04c67fd 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -518,7 +518,7 @@ int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr, } int sysfs_add_file_mode(struct sysfs_dirent *dir_sd, - const struct attribute *attr, int type, mode_t amode) + const struct attribute *attr, int type, umode_t amode) { umode_t mode = (amode & S_IALLUGO) | S_IFREG; struct sysfs_addrm_cxt acxt; diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index c81b22f3ace162629e790ee4e06941861b97e576..4a802b4a90566aaf45e4e0c710faf870085caf6a 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -187,7 +187,7 @@ int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value, return error; } -static inline void set_default_inode_attr(struct inode * inode, mode_t mode) +static inline void set_default_inode_attr(struct inode * inode, umode_t mode) { inode->i_mode = mode; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index ce29e28b766d9dbe6812ca506e6fbb0f7a44ec9e..7484a36ee67863f7bc28c2a053104480b92456c5 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -79,7 +79,7 @@ struct sysfs_dirent { }; unsigned int s_flags; - unsigned short s_mode; + umode_t s_mode; ino_t s_ino; struct sysfs_inode_attrs *s_iattr; }; @@ -229,7 +229,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr, int type); int sysfs_add_file_mode(struct sysfs_dirent *dir_sd, - const struct attribute *attr, int type, mode_t amode); + const struct attribute *attr, int type, umode_t amode); /* * bin.c */