diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-21 15:48:42 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-22 08:58:14 -0400 |
commit | 17f26b1246425a5b77f05ac871889265357566a8 (patch) | |
tree | 65a2f3a4119dc2de2e5448e5a8a19fd0b2754a36 /fs | |
parent | c281fa9c1f273542b45711e4737ace43c2066605 (diff) |
NFSv4: Deal with some more sparse warnings
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 12 | ||||
-rw-r--r-- | 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 3bc163212ab6..e53e42b6100f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1103,7 +1103,7 @@ static int update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stat | |||
1103 | goto no_delegation; | 1103 | goto no_delegation; |
1104 | 1104 | ||
1105 | spin_lock(&deleg_cur->lock); | 1105 | spin_lock(&deleg_cur->lock); |
1106 | if (nfsi->delegation != deleg_cur || | 1106 | if (rcu_dereference(nfsi->delegation) != deleg_cur || |
1107 | test_bit(NFS_DELEGATION_RETURNING, &deleg_cur->flags) || | 1107 | test_bit(NFS_DELEGATION_RETURNING, &deleg_cur->flags) || |
1108 | (deleg_cur->type & fmode) != fmode) | 1108 | (deleg_cur->type & fmode) != fmode) |
1109 | goto no_delegation_unlock; | 1109 | goto no_delegation_unlock; |
@@ -4632,11 +4632,11 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp, | |||
4632 | /* An impossible timestamp guarantees this value | 4632 | /* An impossible timestamp guarantees this value |
4633 | * will never match a generated boot time. */ | 4633 | * will never match a generated boot time. */ |
4634 | verf[0] = 0; | 4634 | verf[0] = 0; |
4635 | verf[1] = (__be32)(NSEC_PER_SEC + 1); | 4635 | verf[1] = cpu_to_be32(NSEC_PER_SEC + 1); |
4636 | } else { | 4636 | } else { |
4637 | struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); | 4637 | struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); |
4638 | verf[0] = (__be32)nn->boot_time.tv_sec; | 4638 | verf[0] = cpu_to_be32(nn->boot_time.tv_sec); |
4639 | verf[1] = (__be32)nn->boot_time.tv_nsec; | 4639 | verf[1] = cpu_to_be32(nn->boot_time.tv_nsec); |
4640 | } | 4640 | } |
4641 | memcpy(bootverf->data, verf, sizeof(bootverf->data)); | 4641 | memcpy(bootverf->data, verf, sizeof(bootverf->data)); |
4642 | } | 4642 | } |
@@ -7263,7 +7263,7 @@ static void nfs41_free_stateid_release(void *calldata) | |||
7263 | kfree(calldata); | 7263 | kfree(calldata); |
7264 | } | 7264 | } |
7265 | 7265 | ||
7266 | const struct rpc_call_ops nfs41_free_stateid_ops = { | 7266 | static const struct rpc_call_ops nfs41_free_stateid_ops = { |
7267 | .rpc_call_prepare = nfs41_free_stateid_prepare, | 7267 | .rpc_call_prepare = nfs41_free_stateid_prepare, |
7268 | .rpc_call_done = nfs41_free_stateid_done, | 7268 | .rpc_call_done = nfs41_free_stateid_done, |
7269 | .rpc_release = nfs41_free_stateid_release, | 7269 | .rpc_release = nfs41_free_stateid_release, |
@@ -7483,7 +7483,7 @@ const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = { | |||
7483 | #endif | 7483 | #endif |
7484 | }; | 7484 | }; |
7485 | 7485 | ||
7486 | const struct inode_operations nfs4_dir_inode_operations = { | 7486 | static const struct inode_operations nfs4_dir_inode_operations = { |
7487 | .create = nfs_create, | 7487 | .create = nfs_create, |
7488 | .lookup = nfs_lookup, | 7488 | .lookup = nfs_lookup, |
7489 | .atomic_open = nfs_atomic_open, | 7489 | .atomic_open = nfs_atomic_open, |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 1a4a3bd415ed..133626318149 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1816,7 +1816,7 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1816 | *p++ = cpu_to_be32(RPC_AUTH_UNIX); /* auth_sys */ | 1816 | *p++ = cpu_to_be32(RPC_AUTH_UNIX); /* auth_sys */ |
1817 | 1817 | ||
1818 | /* authsys_parms rfc1831 */ | 1818 | /* authsys_parms rfc1831 */ |
1819 | *p++ = (__be32)nn->boot_time.tv_nsec; /* stamp */ | 1819 | *p++ = cpu_to_be32(nn->boot_time.tv_nsec); /* stamp */ |
1820 | p = xdr_encode_opaque(p, machine_name, len); | 1820 | p = xdr_encode_opaque(p, machine_name, len); |
1821 | *p++ = cpu_to_be32(0); /* UID */ | 1821 | *p++ = cpu_to_be32(0); /* UID */ |
1822 | *p++ = cpu_to_be32(0); /* GID */ | 1822 | *p++ = cpu_to_be32(0); /* GID */ |