[pnfs] [PATCH 4/4] nfs41: get rid of cb_compound_hdr_arg.callback_ident

Trond Myklebust trond.myklebust at fys.uio.no
Wed Feb 6 13:09:55 EST 2008


On Wed, 2008-02-06 at 20:05 +0200, Benny Halevy wrote:
> From: Benny Halevy <bhalevy at panasas.com>
> 
> callback_ident is not used anywhere so we shouldn't waste any memory to
> store it.
> 
> Signed-off-by: Benny Halevy <bhalevy at panasas.com>
> ---
>  fs/nfs/callback.h     |    1 -
>  fs/nfs/callback_xdr.c |    2 +-
>  2 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
> index 406fedf..46d0dbc 100644
> --- a/fs/nfs/callback.h
> +++ b/fs/nfs/callback.h
> @@ -37,7 +37,6 @@ struct cb_compound_hdr_arg {
>  	unsigned int taglen;
>  	const char *tag;
>  	unsigned int minorversion;
> -	unsigned int callback_ident;
>  	unsigned nops;
>  };
>  
> diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
> index 190fce7..009f4a4 100644
> --- a/fs/nfs/callback_xdr.c
> +++ b/fs/nfs/callback_xdr.c
> @@ -172,7 +172,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
>  		p = read_buf(xdr, 8);
>  		if (unlikely(p == NULL))
>  			return htonl(NFS4ERR_RESOURCE);
> -		hdr->callback_ident = ntohl(*p++);
> +		(void)ntohl(*p++);	/* skip callback_ident */
                  ^^^^^^^^^^^^^^^^^ WTF???

What's wrong with 'p++'?

Trond



More information about the pNFS mailing list