* [PATCH] fix up XFS_ERROR() usage in xfs_lrw.c
@ 2007-08-28 21:10 Eric Sandeen
0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2007-08-28 21:10 UTC (permalink / raw)
To: xfs mailing list
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 <sandeen@sandeen.net>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c
@@ -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)) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-28 21:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-28 21:10 [PATCH] fix up XFS_ERROR() usage in xfs_lrw.c Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox