From: Eric Sandeen <sandeen@sandeen.net>
To: xfs mailing list <xfs@oss.sgi.com>
Subject: [PATCH] fix up XFS_ERROR() usage in xfs_lrw.c
Date: Tue, 28 Aug 2007 16:10:44 -0500 [thread overview]
Message-ID: <46D48F54.8080200@sandeen.net> (raw)
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)) {
reply other threads:[~2007-08-28 21:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46D48F54.8080200@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox