|
46 | 46 | #include <linux/part_stat.h>
|
47 | 47 | #include <linux/kthread.h>
|
48 | 48 | #include <linux/freezer.h>
|
| 49 | +#include <linux/fsnotify.h> |
49 | 50 |
|
50 | 51 | #include "ext4.h"
|
51 | 52 | #include "ext4_extents.h" /* Needed for trace points definition */
|
@@ -759,6 +760,8 @@ void __ext4_error(struct super_block *sb, const char *function,
|
759 | 760 | sb->s_id, function, line, current->comm, &vaf);
|
760 | 761 | va_end(args);
|
761 | 762 | }
|
| 763 | + fsnotify_sb_error(sb, NULL, error ? error : EFSCORRUPTED); |
| 764 | + |
762 | 765 | ext4_handle_error(sb, force_ro, error, 0, block, function, line);
|
763 | 766 | }
|
764 | 767 |
|
@@ -789,6 +792,8 @@ void __ext4_error_inode(struct inode *inode, const char *function,
|
789 | 792 | current->comm, &vaf);
|
790 | 793 | va_end(args);
|
791 | 794 | }
|
| 795 | + fsnotify_sb_error(inode->i_sb, inode, error ? error : EFSCORRUPTED); |
| 796 | + |
792 | 797 | ext4_handle_error(inode->i_sb, false, error, inode->i_ino, block,
|
793 | 798 | function, line);
|
794 | 799 | }
|
@@ -827,6 +832,8 @@ void __ext4_error_file(struct file *file, const char *function,
|
827 | 832 | current->comm, path, &vaf);
|
828 | 833 | va_end(args);
|
829 | 834 | }
|
| 835 | + fsnotify_sb_error(inode->i_sb, inode, EFSCORRUPTED); |
| 836 | + |
830 | 837 | ext4_handle_error(inode->i_sb, false, EFSCORRUPTED, inode->i_ino, block,
|
831 | 838 | function, line);
|
832 | 839 | }
|
@@ -894,6 +901,7 @@ void __ext4_std_error(struct super_block *sb, const char *function,
|
894 | 901 | printk(KERN_CRIT "EXT4-fs error (device %s) in %s:%d: %s\n",
|
895 | 902 | sb->s_id, function, line, errstr);
|
896 | 903 | }
|
| 904 | + fsnotify_sb_error(sb, NULL, errno ? errno : EFSCORRUPTED); |
897 | 905 |
|
898 | 906 | ext4_handle_error(sb, false, -errno, 0, 0, function, line);
|
899 | 907 | }
|
|
0 commit comments