sysfs_remove_bin_file: no return value, dump_stack on error
Make sysfs_remove_bin_file() void. If it detects an error, printk the file name and call dump_stack(). sysfs_hash_and_remove() now returns an error code indicating its success or failure so that sysfs_remove_bin_file() can know success/failure. Convert the only driver that checked the return value of sysfs_remove_bin_file(). Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
此提交包含在:
@@ -10,7 +10,7 @@ extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *,
|
||||
umode_t, int);
|
||||
|
||||
extern int sysfs_add_file(struct dentry *, const struct attribute *, int);
|
||||
extern void sysfs_hash_and_remove(struct dentry * dir, const char * name);
|
||||
extern int sysfs_hash_and_remove(struct dentry * dir, const char * name);
|
||||
extern struct sysfs_dirent *sysfs_find(struct sysfs_dirent *dir, const char * name);
|
||||
|
||||
extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **);
|
||||
|
新增問題並參考
封鎖使用者