[PATCH 3/3] xfs: test for valid remount options, error if not
Eric Sandeen
sandeen at sandeen.net
Mon Feb 15 17:07:18 CST 2016
On 2/15/16 2:25 PM, Dave Chinner wrote:
> I think hiding a goto like this is wrong - it forces you to go read
> the macro, making the code harder to read and follow. Really, what's
> wrong with the simple and obvious:
>
>
> if (bad option) {
> bad_option = "bad option string";
> goto out_warn;
> }
> .....
>
> out_warn:
> xfs_warn(mp, "%s options may not be changed via remount",
> bad_option);
> // free stuff
> return -EINVAL;
> }
>
> Yes, I know that this sort of logic flow hiding was done with the
> XFS_WANT_CORRUPTED macros, but they were written back in 90s on Irix
> when using macros to implement everything were all the rage.
Yeah, fair point, not sure why I did that ;) Old habits?
-Eric
More information about the xfs
mailing list