]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: fix and streamline error handling in xfs_end_io
authorChristoph Hellwig <hch@lst.de>
Thu, 2 Mar 2017 23:02:51 +0000 (15:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 07:35:05 +0000 (09:35 +0200)
commit87cdf91a6bf4c6103365a79b2f932a732b61cd6d
tree00f922ab50b44102011c9d96fdde1760e113e120
parent1c0d974bea214caa848a2acac03b22d3021de92a
xfs: fix and streamline error handling in xfs_end_io

commit 787eb485509f9d58962bd8b4dbc6a5ac6e2034fe upstream.

There are two different cases of buffered I/O errors:

 - first we can have an already shutdown fs.  In that case we should skip
   any on-disk operations and just clean up the appen transaction if
   present and destroy the ioend
 - a real I/O error.  In that case we should cleanup any lingering COW
   blocks.  This gets skipped in the current code and is fixed by this
   patch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_aops.c