aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-04 18:13:56 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-06 10:32:46 -0500
commit1e3987c3052a48fbfc8f5d30214c825eff41192d (patch)
tree7940587f55f176c6f0bc7c293834a376e6130037
parentea9d23f51041036b5d5d062dae2fafe0f670449c (diff)
NFSv4: Rename nfs4_copy_stateid()
It is really a function for selecting the correct stateid to use in a read or write situation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/nfs4_fs.h2
-rw-r--r--fs/nfs/nfs4proc.c2
-rw-r--r--fs/nfs/nfs4state.c2
-rw-r--r--fs/nfs/nfs4xdr.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 624d4becf01..308d2f999c3 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -329,7 +329,7 @@ extern void nfs41_handle_server_scope(struct nfs_client *,
329 struct server_scope **); 329 struct server_scope **);
330extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); 330extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp);
331extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); 331extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl);
332extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t, pid_t); 332extern void nfs4_select_rw_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t, pid_t);
333 333
334extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_mask); 334extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_mask);
335extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task); 335extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b0647b38740..f181c70ea93 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1922,7 +1922,7 @@ static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
1922 if (nfs4_copy_delegation_stateid(&arg.stateid, inode)) { 1922 if (nfs4_copy_delegation_stateid(&arg.stateid, inode)) {
1923 /* Use that stateid */ 1923 /* Use that stateid */
1924 } else if (state != NULL) { 1924 } else if (state != NULL) {
1925 nfs4_copy_stateid(&arg.stateid, state, current->files, current->tgid); 1925 nfs4_select_rw_stateid(&arg.stateid, state, current->files, current->tgid);
1926 } else 1926 } else
1927 memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid)); 1927 memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid));
1928 1928
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index d60e7ad2690..6ba82271c86 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -888,7 +888,7 @@ int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl)
888 * Byte-range lock aware utility to initialize the stateid of read/write 888 * Byte-range lock aware utility to initialize the stateid of read/write
889 * requests. 889 * requests.
890 */ 890 */
891void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t fl_owner, pid_t fl_pid) 891void nfs4_select_rw_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t fl_owner, pid_t fl_pid)
892{ 892{
893 struct nfs4_lock_state *lsp; 893 struct nfs4_lock_state *lsp;
894 int seq; 894 int seq;
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index c03ba77679a..38736dca1b1 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1546,7 +1546,7 @@ static void encode_open_stateid(struct xdr_stream *xdr, const struct nfs_open_co
1546 nfs4_stateid stateid; 1546 nfs4_stateid stateid;
1547 1547
1548 if (ctx->state != NULL) { 1548 if (ctx->state != NULL) {
1549 nfs4_copy_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid); 1549 nfs4_select_rw_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid);
1550 if (zero_seqid) 1550 if (zero_seqid)
1551 stateid.stateid.seqid = 0; 1551 stateid.stateid.seqid = 0;
1552 encode_nfs4_stateid(xdr, &stateid); 1552 encode_nfs4_stateid(xdr, &stateid);