mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
md: use sysfs_notify_dirent to notify changes to md/dev-xxx/state
The 'state' file for a device reports, for example, when the device has failed. Changes should be reported to userspace ASAP without the possibility of blocking on low-memory. sysfs_notify does have that possibility (as it takes a mutex which can be held across a kmalloc) so use sysfs_notify_dirent instead. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
b62b75905d
commit
3c0ee63a64
2 changed files with 15 additions and 9 deletions
|
@ -115,6 +115,9 @@ struct mdk_rdev_s
|
|||
* in superblock.
|
||||
*/
|
||||
struct work_struct del_work; /* used for delayed sysfs removal */
|
||||
|
||||
struct sysfs_dirent *sysfs_state; /* handle for 'state'
|
||||
* sysfs entry */
|
||||
};
|
||||
|
||||
struct mddev_s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue