Skip to content

Commit 140150d

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
SUNRPC: Remove unused function xdr_encode_pages
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent b42353f commit 140150d

3 files changed

Lines changed: 1 addition & 33 deletions

File tree

‎fs/nfs/nfs4proc.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,9 +2766,7 @@ static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
27662766
*
27672767
* In the case of WRITE, we also want to put the GETATTR after
27682768
* the operation -- in this case because we want to make sure
2769-
* we get the post-operation mtime and size. This means that
2770-
* we can't use xdr_encode_pages() as written: we need a variant
2771-
* of it which would leave room in the 'tail' iovec.
2769+
* we get the post-operation mtime and size.
27722770
*
27732771
* Both of these changes to the XDR layer would in fact be quite
27742772
* minor, but I decided to leave them for a subsequent patch.

‎include/linux/sunrpc/xdr.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ __be32 *xdr_decode_string_inplace(__be32 *p, char **sp, unsigned int *lenp,
104104
__be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *);
105105
__be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *);
106106

107-
void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int,
108-
unsigned int);
109107
void xdr_inline_pages(struct xdr_buf *, unsigned int,
110108
struct page **, unsigned int, unsigned int);
111109
void xdr_terminate_string(struct xdr_buf *, const u32);

‎net/sunrpc/xdr.c‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -128,34 +128,6 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
128128
}
129129
EXPORT_SYMBOL_GPL(xdr_terminate_string);
130130

131-
void
132-
xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
133-
unsigned int len)
134-
{
135-
struct kvec *tail = xdr->tail;
136-
u32 *p;
137-
138-
xdr->pages = pages;
139-
xdr->page_base = base;
140-
xdr->page_len = len;
141-
142-
p = (u32 *)xdr->head[0].iov_base + XDR_QUADLEN(xdr->head[0].iov_len);
143-
tail->iov_base = p;
144-
tail->iov_len = 0;
145-
146-
if (len & 3) {
147-
unsigned int pad = 4 - (len & 3);
148-
149-
*p = 0;
150-
tail->iov_base = (char *)p + (len & 3);
151-
tail->iov_len = pad;
152-
len += pad;
153-
}
154-
xdr->buflen += len;
155-
xdr->len += len;
156-
}
157-
EXPORT_SYMBOL_GPL(xdr_encode_pages);
158-
159131
void
160132
xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
161133
struct page **pages, unsigned int base, unsigned int len)

0 commit comments

Comments
 (0)