diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-09-23 17:38:08 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-03 05:37:45 +0100 |
commit | 4d796d751cefdb942a54c570bd3087d8be3bb893 (patch) | |
tree | 52d97c2b7a3a6d8d3b67cdec678fd11c56ef5db9 /fs/nfs/nfs4xdr.c | |
parent | NFSv4: Add a generic structure for managing layout-private information (diff) | |
download | linux-4d796d751cefdb942a54c570bd3087d8be3bb893.tar.xz linux-4d796d751cefdb942a54c570bd3087d8be3bb893.zip |
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); |