diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-09-23 11:38:08 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-02 23:37:45 -0500 |
commit | 4d796d751cefdb942a54c570bd3087d8be3bb893 (patch) | |
tree | 52d97c2b7a3a6d8d3b67cdec678fd11c56ef5db9 /fs/nfs/nfs4xdr.c | |
parent | f8c3cf9d7d7f04718e0d51c28f8430afa6058b3b (diff) |
pNFS: Allow layout drivers to manage private data in struct nfs4_layoutreturn
Cleanup to allow layout drivers to attach private data to layoutreturn,
and manage the data.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 84fdcf27138c..1c1768a8fcd1 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -2035,7 +2035,9 @@ encode_layoutreturn(struct xdr_stream *xdr, spin_lock(&args->inode->i_lock); encode_nfs4_stateid(xdr, &args->stateid); spin_unlock(&args->inode->i_lock); - if (lr_ops->encode_layoutreturn) + if (args->ld_private->ops && args->ld_private->ops->encode) + args->ld_private->ops->encode(xdr, args, args->ld_private); + else if (lr_ops->encode_layoutreturn) lr_ops->encode_layoutreturn(xdr, args); else encode_uint32(xdr, 0); |