diff options
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4b6613f61341..646f16da0722 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -731,6 +731,13 @@ static int encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask) | |||
731 | bitmask[1] & nfs4_fsinfo_bitmap[1]); | 731 | bitmask[1] & nfs4_fsinfo_bitmap[1]); |
732 | } | 732 | } |
733 | 733 | ||
734 | static int encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask) | ||
735 | { | ||
736 | return encode_getattr_two(xdr, | ||
737 | bitmask[0] & nfs4_fs_locations_bitmap[0], | ||
738 | bitmask[1] & nfs4_fs_locations_bitmap[1]); | ||
739 | } | ||
740 | |||
734 | static int encode_getfh(struct xdr_stream *xdr) | 741 | static int encode_getfh(struct xdr_stream *xdr) |
735 | { | 742 | { |
736 | uint32_t *p; | 743 | uint32_t *p; |
@@ -2030,10 +2037,10 @@ static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, uint32_t *p, struct n | |||
2030 | goto out; | 2037 | goto out; |
2031 | if ((status = encode_lookup(&xdr, args->name)) != 0) | 2038 | if ((status = encode_lookup(&xdr, args->name)) != 0) |
2032 | goto out; | 2039 | goto out; |
2033 | if ((status = encode_getfattr(&xdr, args->bitmask)) != 0) | 2040 | if ((status = encode_fs_locations(&xdr, args->bitmask)) != 0) |
2034 | goto out; | 2041 | goto out; |
2035 | /* set up reply | 2042 | /* set up reply |
2036 | * toplevel_status + taglen + rescount + OP_PUTFH + status | 2043 | * toplevel_status + OP_PUTFH + status |
2037 | * + OP_LOOKUP + status + OP_GETATTR + status = 7 | 2044 | * + OP_LOOKUP + status + OP_GETATTR + status = 7 |
2038 | */ | 2045 | */ |
2039 | replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2; | 2046 | replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2; |