diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 9 | ||||
-rw-r--r-- | fs/nfs/pnfs.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index f24212064356..d464badc0067 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1920,8 +1920,13 @@ encode_layoutreturn(struct xdr_stream *xdr, | |||
1920 | spin_lock(&args->inode->i_lock); | 1920 | spin_lock(&args->inode->i_lock); |
1921 | xdr_encode_opaque_fixed(p, &args->stateid.data, NFS4_STATEID_SIZE); | 1921 | xdr_encode_opaque_fixed(p, &args->stateid.data, NFS4_STATEID_SIZE); |
1922 | spin_unlock(&args->inode->i_lock); | 1922 | spin_unlock(&args->inode->i_lock); |
1923 | p = reserve_space(xdr, 4); | 1923 | if (NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn) { |
1924 | *p = cpu_to_be32(0); | 1924 | NFS_SERVER(args->inode)->pnfs_curr_ld->encode_layoutreturn( |
1925 | NFS_I(args->inode)->layout, xdr, args); | ||
1926 | } else { | ||
1927 | p = reserve_space(xdr, 4); | ||
1928 | *p = cpu_to_be32(0); | ||
1929 | } | ||
1925 | hdr->nops++; | 1930 | hdr->nops++; |
1926 | hdr->replen += decode_layoutreturn_maxsz; | 1931 | hdr->replen += decode_layoutreturn_maxsz; |
1927 | } | 1932 | } |
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index af3967a893a1..1b6b207a8806 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -104,6 +104,10 @@ struct pnfs_layoutdriver_type { | |||
104 | enum pnfs_try_status (*write_pagelist) (struct nfs_write_data *nfs_data, int how); | 104 | enum pnfs_try_status (*write_pagelist) (struct nfs_write_data *nfs_data, int how); |
105 | 105 | ||
106 | void (*free_deviceid_node) (struct nfs4_deviceid_node *); | 106 | void (*free_deviceid_node) (struct nfs4_deviceid_node *); |
107 | |||
108 | void (*encode_layoutreturn) (struct pnfs_layout_hdr *layoutid, | ||
109 | struct xdr_stream *xdr, | ||
110 | const struct nfs4_layoutreturn_args *args); | ||
107 | }; | 111 | }; |
108 | 112 | ||
109 | struct pnfs_layout_hdr { | 113 | struct pnfs_layout_hdr { |