mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
xfs: add missing error check in xfs_prepare_shift()
xfs_prepare_shift() fails to check the error return from
xfs_flush_unmap_range(). If the latter fails, that could lead to an
insert/collapse range operation over a delalloc range, which is not
supported.
Add an error check and return appropriately. This is reproduced
rarely by generic/475.
Fixes: 7f9f71be84 ("xfs: extent shifting doesn't fully invalidate page cache")
Signed-off-by: Brian Foster <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Allison Collins <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
This commit is contained in:
parent
47cd97b5b2
commit
1749d1ea89
1 changed files with 2 additions and 0 deletions
|
|
@ -1193,6 +1193,8 @@ xfs_prepare_shift(
|
|||
* about to shift down every extent from offset to EOF.
|
||||
*/
|
||||
error = xfs_flush_unmap_range(ip, offset, XFS_ISIZE(ip));
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
/*
|
||||
* Clean out anything hanging around in the cow fork now that
|
||||
|
|
|
|||
Loading…
Reference in a new issue