Skip to content

xfs: clean up return handling

Eric Sandeen linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: return is not a functionfs/xfs/xfs_attr.c fs/xfs/xfs_attr_inactive.c fs/xfs/xfs_attr_leaf.c +10 more+148 -1481 reply
2/2xfs: Nuke XFS_ERROR macrofs/xfs/xfs_aops.c fs/xfs/xfs_attr.c fs/xfs/xfs_attr_inactive.c +42 more+490 -52211 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] xfs: clean up return handling

2 patches here:

First of all, "return" is not a function. "return(EIO);" is silly. "return (EIO);" is even sillier. Stop it.

Second of all, 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 the same thing today with systemtap.

So nuke that macro, too.

This is a *lot* of churn. It'll make merging across this change hard. So we might want to batch this up with another suggestion of Dave's, to migrate all of xfs to the Linux convention of negative error returns everywhere, so we don't have two nasty points to merge across - that'd be fine with me. But anyway, here it is for now.

For posterity, the first patch was generated with:

perl -p -i -e 's/return \(([a-zA-Z0-9]*?)\)/return $1/g' *.c perl -p -i -e 's/return\(([a-zA-Z0-9]*?)\)/return $1/g' *.c

and the 2nd with:

perl -p -i -e 's/return\(XFS_ERROR\(([a-zA-Z0-9]*?)\)\)/return XFS_ERROR($1)/g' *.c perl -p -i -e 's/return \(XFS_ERROR\(([a-zA-Z0-9]*?)\)\)/return XFS_ERROR($1)/g' *.c

(Yes, I know I could have done it w/ one regexp - so sue me) ;)

-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs