Re: [PATCH v1 07/61] NFSD: Replace READ* macros in nfsd4_decode_close()

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

 



>  {
> +	__be32 *p;
>  
> +	p = xdr_inline_decode(argp->xdr, NFS4_STATEID_SIZE);
> +	if (!p)
> +		goto xdr_error;
>  	sid->si_generation = be32_to_cpup(p++);
> +	memcpy(&sid->si_opaque, p, sizeof(sid->si_opaque));
> +	return nfs_ok;
> +xdr_error:
> +	return nfserr_bad_xdr;

Using a goto for a trivial direct error return looks pretty strange
and makes the code harder to follow.  This seems to happen quite a bit
in this and the following patches.



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux