summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_itable.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2014-06-22 15:04:54 +1000
committerDave Chinner <david@fromorbit.com>2014-06-22 15:04:54 +1000
commitb474c7ae4395ba684e85fde8f55c8cf44a39afaf (patch)
treea7d3cad895a9e1f14894710b43e9ccbf634da3f1 /fs/xfs/xfs_itable.c
parentd99831ff393ff2e28d6110b41f24d9fecf986222 (diff)
xfs: Nuke XFS_ERROR macro
XFS_ERROR was designed long ago to trap return values, but it's not runtime configurable, it's not consistently used, and we can do similar error trapping with ftrace scripts and triggers from userspace. Just nuke XFS_ERROR and associated bits. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r--fs/xfs/xfs_itable.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index cb64f222d607..e4056a7495e5 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -67,11 +67,11 @@ xfs_bulkstat_one_int(
*stat = BULKSTAT_RV_NOTHING;
if (!buffer || xfs_internal_inum(mp, ino))
- return XFS_ERROR(EINVAL);
+ return EINVAL;
buf = kmem_alloc(sizeof(*buf), KM_SLEEP | KM_MAYFAIL);
if (!buf)
- return XFS_ERROR(ENOMEM);
+ return ENOMEM;
error = xfs_iget(mp, NULL, ino,
(XFS_IGET_DONTCACHE | XFS_IGET_UNTRUSTED),
@@ -154,9 +154,9 @@ xfs_bulkstat_one_fmt(
const xfs_bstat_t *buffer)
{
if (ubsize < sizeof(*buffer))
- return XFS_ERROR(ENOMEM);
+ return ENOMEM;
if (copy_to_user(ubuffer, buffer, sizeof(*buffer)))
- return XFS_ERROR(EFAULT);
+ return EFAULT;
if (ubused)
*ubused = sizeof(*buffer);
return 0;
@@ -552,7 +552,7 @@ xfs_bulkstat_single(
return error;
if (count == 0 || (xfs_ino_t)*lastinop != ino)
return error == EFSCORRUPTED ?
- XFS_ERROR(EINVAL) : error;
+ EINVAL : error;
else
return 0;
}
@@ -661,7 +661,7 @@ xfs_inumbers(
if (bufidx == bcount) {
long written;
if (formatter(ubuffer, buffer, bufidx, &written)) {
- error = XFS_ERROR(EFAULT);
+ error = EFAULT;
break;
}
ubuffer += written;
@@ -688,7 +688,7 @@ xfs_inumbers(
if (bufidx) {
long written;
if (formatter(ubuffer, buffer, bufidx, &written))
- error = XFS_ERROR(EFAULT);
+ error = EFAULT;
else
*count += bufidx;
}