linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <Chuck.Lever@oracle.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 3/6] NFSv4: Deal with some more sparse warnings
Date: Thu, 22 Aug 2013 08:49:23 -0400	[thread overview]
Message-ID: <9554DA28-1BE7-423C-9ECA-3EDD65681908@oracle.com> (raw)
In-Reply-To: <1377131186-40249-3-git-send-email-Trond.Myklebust@netapp.com>


On Aug 21, 2013, at 8:26 PM, Trond Myklebust <Trond.Myklebust@netapp.com> wrote:

> Technically, we don't really need to convert these time stamps,
> since they are actually cookies.
> 
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> Cc: Chuck Lever <Chuck.Lever@oracle.com>

Acked-by: Chuck Lever <chuck.lever@oracle.com>


> ---
> fs/nfs/nfs4proc.c | 12 ++++++------
> fs/nfs/nfs4xdr.c  |  2 +-
> 2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 155c2fa..b577ebb 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -1099,7 +1099,7 @@ static int update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stat
> 		goto no_delegation;
> 
> 	spin_lock(&deleg_cur->lock);
> -	if (nfsi->delegation != deleg_cur ||
> +	if (rcu_dereference(nfsi->delegation) != deleg_cur ||
> 	   test_bit(NFS_DELEGATION_RETURNING, &deleg_cur->flags) ||
> 	    (deleg_cur->type & fmode) != fmode)
> 		goto no_delegation_unlock;
> @@ -4628,11 +4628,11 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp,
> 		/* An impossible timestamp guarantees this value
> 		 * will never match a generated boot time. */
> 		verf[0] = 0;
> -		verf[1] = (__be32)(NSEC_PER_SEC + 1);
> +		verf[1] = cpu_to_be32(NSEC_PER_SEC + 1);
> 	} else {
> 		struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
> -		verf[0] = (__be32)nn->boot_time.tv_sec;
> -		verf[1] = (__be32)nn->boot_time.tv_nsec;
> +		verf[0] = cpu_to_be32(nn->boot_time.tv_sec);
> +		verf[1] = cpu_to_be32(nn->boot_time.tv_nsec);
> 	}
> 	memcpy(bootverf->data, verf, sizeof(bootverf->data));
> }
> @@ -7259,7 +7259,7 @@ static void nfs41_free_stateid_release(void *calldata)
> 	kfree(calldata);
> }
> 
> -const struct rpc_call_ops nfs41_free_stateid_ops = {
> +static const struct rpc_call_ops nfs41_free_stateid_ops = {
> 	.rpc_call_prepare = nfs41_free_stateid_prepare,
> 	.rpc_call_done = nfs41_free_stateid_done,
> 	.rpc_release = nfs41_free_stateid_release,
> @@ -7479,7 +7479,7 @@ const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = {
> #endif
> };
> 
> -const struct inode_operations nfs4_dir_inode_operations = {
> +static const struct inode_operations nfs4_dir_inode_operations = {
> 	.create		= nfs_create,
> 	.lookup		= nfs_lookup,
> 	.atomic_open	= nfs_atomic_open,
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 1a4a3bd..1336263 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -1816,7 +1816,7 @@ static void encode_create_session(struct xdr_stream *xdr,
> 	*p++ = cpu_to_be32(RPC_AUTH_UNIX);			/* auth_sys */
> 
> 	/* authsys_parms rfc1831 */
> -	*p++ = (__be32)nn->boot_time.tv_nsec;		/* stamp */
> +	*p++ = cpu_to_be32(nn->boot_time.tv_nsec);	/* stamp */
> 	p = xdr_encode_opaque(p, machine_name, len);
> 	*p++ = cpu_to_be32(0);				/* UID */
> 	*p++ = cpu_to_be32(0);				/* GID */
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





  parent reply	other threads:[~2013-08-22 12:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22  0:26 [PATCH 1/6] NFSv3: Deal with a sparse warning in nfs3_proc_create Trond Myklebust
2013-08-22  0:26 ` [PATCH 2/6] NFSv4: Deal with a sparse warning in nfs4_opendata_alloc Trond Myklebust
2013-08-22  0:26   ` [PATCH 3/6] NFSv4: Deal with some more sparse warnings Trond Myklebust
2013-08-22  0:26     ` [PATCH 4/6] NFSv4: Deal with a sparse warning in nfs_idmap_get_key() Trond Myklebust
2013-08-22  0:26       ` [PATCH 5/6] NFSv4: Fix an incorrect pointer declaration in decode_first_pnfs_layout_type Trond Myklebust
2013-08-22  0:26         ` [PATCH 6/6] NFS: Clean up nfs_sillyrename() Trond Myklebust
2013-08-22 12:55       ` [PATCH 4/6] NFSv4: Deal with a sparse warning in nfs_idmap_get_key() Bryan Schumaker
2013-08-22 12:49     ` Chuck Lever [this message]
2013-08-22 14:12 ` [PATCH 1/6] NFSv3: Deal with a sparse warning in nfs3_proc_create Peter Staubach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9554DA28-1BE7-423C-9ECA-3EDD65681908@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).