NFSv4: Rename nfs4_copy_stateid()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 4 Mar 2012 23:13:56 +0000 (18:13 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 6 Mar 2012 15:32:46 +0000 (10:32 -0500)
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>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
fs/nfs/nfs4xdr.c

index 624d4becf017ae3d0c385f1ec7ab12d4825896f7..308d2f999c3df00e39edcde050966c09f4b21a64 100644 (file)
@@ -329,7 +329,7 @@ extern void nfs41_handle_server_scope(struct nfs_client *,
                                      struct server_scope **);
 extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp);
 extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl);
-extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t, pid_t);
+extern void nfs4_select_rw_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t, pid_t);
 
 extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_mask);
 extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task);
index b0647b387403e5efb1b75cdc8b0638282d1606d2..f181c70ea9337adc6fc118854289f4d2981d9e08 100644 (file)
@@ -1922,7 +1922,7 @@ static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
        if (nfs4_copy_delegation_stateid(&arg.stateid, inode)) {
                /* Use that stateid */
        } else if (state != NULL) {
-               nfs4_copy_stateid(&arg.stateid, state, current->files, current->tgid);
+               nfs4_select_rw_stateid(&arg.stateid, state, current->files, current->tgid);
        } else
                memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid));
 
index d60e7ad2690e779c96a2dfcb72d88bc94d85b0ec..6ba82271c8689c0da4b80216fe8a6922ee991d38 100644 (file)
@@ -888,7 +888,7 @@ int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl)
  * Byte-range lock aware utility to initialize the stateid of read/write
  * requests.
  */
-void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t fl_owner, pid_t fl_pid)
+void nfs4_select_rw_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t fl_owner, pid_t fl_pid)
 {
        struct nfs4_lock_state *lsp;
        int seq;
index c03ba77679ad124b271614518f2d5d7fb848609d..38736dca1b1846ff1ad9f0751f6ee126d9c34fa4 100644 (file)
@@ -1546,7 +1546,7 @@ static void encode_open_stateid(struct xdr_stream *xdr, const struct nfs_open_co
        nfs4_stateid stateid;
 
        if (ctx->state != NULL) {
-               nfs4_copy_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid);
+               nfs4_select_rw_stateid(&stateid, ctx->state, l_ctx->lockowner, l_ctx->pid);
                if (zero_seqid)
                        stateid.stateid.seqid = 0;
                encode_nfs4_stateid(xdr, &stateid);