]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: notify sysfs on errors_count value change
authorJonathan Davies <jonathan.davies@nutanix.com>
Fri, 11 Jun 2021 14:02:08 +0000 (14:02 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 30 Jun 2021 01:06:02 +0000 (21:06 -0400)
commit240fc8c0d0e8eef3811a1af1e788a3233d313e5a
treecf0e2c1db9da3b74e56759d35760a81965c42046
parent5782cf0133e56e6f7706810178624114ff64d0c1
ext4: notify sysfs on errors_count value change

After s_error_count is incremented, signal the change in the
corresponding sysfs attribute via sysfs_notify. This allows userspace to
poll() on changes to /sys/fs/ext4/*/errors_count.

[ Moved call of ext4_notify_error_sysfs() to flush_stashed_error_work()
  to avoid BUG's caused by calling sysfs_notify trying to sleep after
  being called from an invalid context. -- TYT ]

Signed-off-by: Jonathan Davies <jonathan.davies@nutanix.com>
Link: https://lore.kernel.org/r/20210611140209.28903-1-jonathan.davies@nutanix.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/super.c
fs/ext4/sysfs.c