fix up XFS_ERROR() usage in xfs_lrw.c
PATCH 1/1 fix up XFS_ERROR() usage in xfs_lrw.c
Fix up a couple of XFS_ERROR callers who send a negative errno rather than negating the macro itself, at odds with all other callers (if xfs_etrap contained EINVAL this would not be caught)
(hm, should xfs_read be using generic_segment_checks?)
Signed-off-by Eric Sandeen <[email protected]>
fs/xfs/linux-2.6/xfs_lrw.c +2 -2
@@ -210,7 +210,7 @@ xfs_read(*/ size += iv->iov_len;if (unlikely ((ssize_t )(size|iv->iov_len) <0 )) -return XFS_ERROR (-EINVAL ); +return -XFS_ERROR (EINVAL ); }/* END copy & waste from filemap.c */
@@ -740,7 +740,7 @@ start:if ((pos & target->bt_smask) || (count & target->bt_smask)) {xfs_iunlock (xip,XFS_ILOCK_EXCL |iolock); -return XFS_ERROR (-EINVAL ); +return -XFS_ERROR (EINVAL ); }if (!need_i_mutex && (VN_CACHED (vp) || pos > xip->i_size)) {