Re: [PATCH 3/3] xfs: test for valid remount options, error if not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux