diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-08-13 18:54:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-28 16:03:04 -0400 |
commit | 2a369153c82e0c83621b3e71d8f0c53394705bda (patch) | |
tree | bed0f7bfde6d8eac2b58bf0f7c452afb5f906b40 /fs/nfs/nfs4xdr.c | |
parent | b3c54de6f82d01637796bcc1f667a45f3b32e814 (diff) |
NFS: Clean up helper function nfs4_select_rw_stateid()
We want to be able to pass on the information that the page was not
dirtied under a lock. Instead of adding a flag parameter, do this
by passing a pointer to a 'struct nfs_lock_owner' that may be NULL.
Also reuse this structure in struct nfs_lock_context to carry the
fl_owner_t and pid_t.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index a756349b0fa4..7ab29abb3160 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1509,8 +1509,12 @@ static void encode_open_stateid(struct xdr_stream *xdr, | |||
1509 | nfs4_stateid stateid; | 1509 | nfs4_stateid stateid; |
1510 | 1510 | ||
1511 | if (ctx->state != NULL) { | 1511 | if (ctx->state != NULL) { |
1512 | const struct nfs_lockowner *lockowner = NULL; | ||
1513 | |||
1514 | if (l_ctx != NULL) | ||
1515 | lockowner = &l_ctx->lockowner; | ||
1512 | nfs4_select_rw_stateid(&stateid, ctx->state, | 1516 | nfs4_select_rw_stateid(&stateid, ctx->state, |
1513 | fmode, l_ctx->lockowner, l_ctx->pid); | 1517 | fmode, lockowner); |
1514 | if (zero_seqid) | 1518 | if (zero_seqid) |
1515 | stateid.seqid = 0; | 1519 | stateid.seqid = 0; |
1516 | encode_nfs4_stateid(xdr, &stateid); | 1520 | encode_nfs4_stateid(xdr, &stateid); |