Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSD: Make @gdev parameter of ->encode_getdeviceinfo a const pointer

This enables callers to be passed const pointer parameters.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+5 -5
+1 -1
fs/nfsd/blocklayoutxdr.c
··· 77 77 78 78 __be32 79 79 nfsd4_block_encode_getdeviceinfo(struct xdr_stream *xdr, 80 - struct nfsd4_getdeviceinfo *gdp) 80 + const struct nfsd4_getdeviceinfo *gdp) 81 81 { 82 82 struct pnfs_block_deviceaddr *dev = gdp->gd_device; 83 83 int len = sizeof(__be32), ret, i;
+1 -1
fs/nfsd/blocklayoutxdr.h
··· 51 51 }; 52 52 53 53 __be32 nfsd4_block_encode_getdeviceinfo(struct xdr_stream *xdr, 54 - struct nfsd4_getdeviceinfo *gdp); 54 + const struct nfsd4_getdeviceinfo *gdp); 55 55 __be32 nfsd4_block_encode_layoutget(struct xdr_stream *xdr, 56 56 const struct nfsd4_layoutget *lgp); 57 57 int nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp,
+1 -1
fs/nfsd/flexfilelayoutxdr.c
··· 77 77 78 78 __be32 79 79 nfsd4_ff_encode_getdeviceinfo(struct xdr_stream *xdr, 80 - struct nfsd4_getdeviceinfo *gdp) 80 + const struct nfsd4_getdeviceinfo *gdp) 81 81 { 82 82 struct pnfs_ff_device_addr *da = gdp->gd_device; 83 83 int len;
+1 -1
fs/nfsd/flexfilelayoutxdr.h
··· 43 43 }; 44 44 45 45 __be32 nfsd4_ff_encode_getdeviceinfo(struct xdr_stream *xdr, 46 - struct nfsd4_getdeviceinfo *gdp); 46 + const struct nfsd4_getdeviceinfo *gdp); 47 47 __be32 nfsd4_ff_encode_layoutget(struct xdr_stream *xdr, 48 48 const struct nfsd4_layoutget *lgp); 49 49
+1 -1
fs/nfsd/pnfs.h
··· 27 27 struct nfs4_client *clp, 28 28 struct nfsd4_getdeviceinfo *gdevp); 29 29 __be32 (*encode_getdeviceinfo)(struct xdr_stream *xdr, 30 - struct nfsd4_getdeviceinfo *gdevp); 30 + const struct nfsd4_getdeviceinfo *gdevp); 31 31 32 32 __be32 (*proc_layoutget)(struct inode *, const struct svc_fh *fhp, 33 33 struct nfsd4_layoutget *lgp);