vfs: track per-sb writeback errors and report them to syncfs
[linux-block.git] / include / linux / pagemap.h
index a8f7bd8ea1c62983088a7811595a94a66b15c5be..d4409b13747e8c7ea8a62d85476fde58603c8e98 100644 (file)
@@ -51,7 +51,10 @@ static inline void mapping_set_error(struct address_space *mapping, int error)
                return;
 
        /* Record in wb_err for checkers using errseq_t based tracking */
-       filemap_set_wb_err(mapping, error);
+       __filemap_set_wb_err(mapping, error);
+
+       /* Record it in superblock */
+       errseq_set(&mapping->host->i_sb->s_wb_err, error);
 
        /* Record it in flags for now, for legacy callers */
        if (error == -ENOSPC)