New code for 5.9:
- Make sure we call ->iomap_end with a failure code if ->iomap_begin
  failed in any way; some filesystems need to try to undo things.
- Don't invalidate the page cache during direct reads since we already
  sync'd the cache with disk.
- Make direct writes fall back to the page cache if the pre-write
  cache invalidation fails.  This avoids a cache coherency problem.
- Fix some idiotic virus scanner warning bs in the previous tag.
iomap: fall back to buffered writes for invalidation failures

Failing to invalid the page cache means data in incoherent, which is
a very bad state for the system.  Always fall back to buffered I/O
through the page cache if we can't invalidate mappings.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu> # for ext4
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com> # for gfs2
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
6 files changed