Skip to content

Commit

Permalink
xfs: wrong error sign conversion during failed DIO writes
Browse files Browse the repository at this point in the history
We negate the error value being returned from a generic function
incorrectly. The code path that it is running in returned negative
errors, so there is no need to negate it to get the correct error
signs here.

This was uncovered by generic/019.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
  • Loading branch information
Dave Chinner authored and Dave Chinner committed Apr 16, 2014
1 parent 9c23ecc commit 07d5035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ xfs_file_dio_aio_write(
goto out;

if (mapping->nrpages) {
ret = -filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
ret = filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
pos, -1);
if (ret)
goto out;
Expand Down

0 comments on commit 07d5035

Please sign in to comment.