summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr_leaf.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2014-06-22 07:04:54 +0200
committerDave Chinner <david@fromorbit.com>2014-06-22 07:04:54 +0200
commitb474c7ae4395ba684e85fde8f55c8cf44a39afaf (patch)
treea7d3cad895a9e1f14894710b43e9ccbf634da3f1 /fs/xfs/xfs_attr_leaf.c
parentxfs: return is not a function (diff)
downloadlinux-b474c7ae4395ba684e85fde8f55c8cf44a39afaf.tar.xz
linux-b474c7ae4395ba684e85fde8f55c8cf44a39afaf.zip
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_attr_leaf.c')
-rw-r--r--fs/xfs/xfs_attr_leaf.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index d2ce4013084c..127d96aba845 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -547,7 +547,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
break;
}
if (i == end)
- return XFS_ERROR(ENOATTR);
+ return ENOATTR;
/*
* Fix up the attribute fork data, covering the hole
@@ -611,9 +611,9 @@ xfs_attr_shortform_lookup(xfs_da_args_t *args)
continue;
if (!xfs_attr_namesp_match(args->flags, sfe->flags))
continue;
- return XFS_ERROR(EEXIST);
+ return EEXIST;
}
- return XFS_ERROR(ENOATTR);
+ return ENOATTR;
}
/*
@@ -640,18 +640,18 @@ xfs_attr_shortform_getvalue(xfs_da_args_t *args)
continue;
if (args->flags & ATTR_KERNOVAL) {
args->valuelen = sfe->valuelen;
- return XFS_ERROR(EEXIST);
+ return EEXIST;
}
if (args->valuelen < sfe->valuelen) {
args->valuelen = sfe->valuelen;
- return XFS_ERROR(ERANGE);
+ return ERANGE;
}
args->valuelen = sfe->valuelen;
memcpy(args->value, &sfe->nameval[args->namelen],
args->valuelen);
- return XFS_ERROR(EEXIST);
+ return EEXIST;
}
- return XFS_ERROR(ENOATTR);
+ return ENOATTR;
}
/*
@@ -1108,7 +1108,7 @@ xfs_attr3_leaf_add(
* no good and we should just give up.
*/
if (!ichdr.holes && sum < entsize)
- return XFS_ERROR(ENOSPC);
+ return ENOSPC;
/*
* Compact the entries to coalesce free space.
@@ -2123,7 +2123,7 @@ xfs_attr3_leaf_lookup_int(
}
if (probe == ichdr.count || be32_to_cpu(entry->hashval) != hashval) {
args->index = probe;
- return XFS_ERROR(ENOATTR);
+ return ENOATTR;
}
/*
@@ -2152,7 +2152,7 @@ xfs_attr3_leaf_lookup_int(
if (!xfs_attr_namesp_match(args->flags, entry->flags))
continue;
args->index = probe;
- return XFS_ERROR(EEXIST);
+ return EEXIST;
} else {
name_rmt = xfs_attr3_leaf_name_remote(leaf, probe);
if (name_rmt->namelen != args->namelen)
@@ -2168,11 +2168,11 @@ xfs_attr3_leaf_lookup_int(
args->rmtblkcnt = xfs_attr3_rmt_blocks(
args->dp->i_mount,
args->rmtvaluelen);
- return XFS_ERROR(EEXIST);
+ return EEXIST;
}
}
args->index = probe;
- return XFS_ERROR(ENOATTR);
+ return ENOATTR;
}
/*
@@ -2208,7 +2208,7 @@ xfs_attr3_leaf_getvalue(
}
if (args->valuelen < valuelen) {
args->valuelen = valuelen;
- return XFS_ERROR(ERANGE);
+ return ERANGE;
}
args->valuelen = valuelen;
memcpy(args->value, &name_loc->nameval[args->namelen], valuelen);
@@ -2226,7 +2226,7 @@ xfs_attr3_leaf_getvalue(
}
if (args->valuelen < args->rmtvaluelen) {
args->valuelen = args->rmtvaluelen;
- return XFS_ERROR(ERANGE);
+ return ERANGE;
}
args->valuelen = args->rmtvaluelen;
}