aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2004-07-15 22:05:10 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-15 22:05:10 -0700
commitb145333f8f6d2513baf9ffcd52552db7ecb7f97d (patch)
treee7e6e3fa751638c7bca93f9f117cb98af5484f19 /fs
parent8af0afb24eaf9df5aa5a2ea720c3613431f04ad5 (diff)
downloadhistory-b145333f8f6d2513baf9ffcd52552db7ecb7f97d.tar.gz
[PATCH] sparse: iovec cleanups - sunrpc, nfs and nfsd
sunrpc, nfs and nfsd switched to use of kvec and kernel_...msg()
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs2xdr.c6
-rw-r--r--fs/nfs/nfs3xdr.c6
-rw-r--r--fs/nfs/nfs4xdr.c12
-rw-r--r--fs/nfsd/nfs3xdr.c4
-rw-r--r--fs/nfsd/nfs4xdr.c2
-rw-r--r--fs/nfsd/nfscache.c8
-rw-r--r--fs/nfsd/vfs.c8
7 files changed, 23 insertions, 23 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 6a324838fa3419..01aebbf13cc89b 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -231,7 +231,7 @@ nfs_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args)
static int
nfs_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res)
{
- struct iovec *iov = req->rq_rcv_buf.head;
+ struct kvec *iov = req->rq_rcv_buf.head;
int status, count, recvd, hdrlen;
if ((status = ntohl(*p++)))
@@ -375,7 +375,7 @@ static int
nfs_xdr_readdirres(struct rpc_rqst *req, u32 *p, void *dummy)
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
struct page **page;
int hdrlen, recvd;
int status, nr;
@@ -530,7 +530,7 @@ static int
nfs_xdr_readlinkres(struct rpc_rqst *req, u32 *p, void *dummy)
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
unsigned int hdrlen;
u32 *strlen, len;
char *string;
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index 56ca3e91f64ccb..415fa5bbb8c3f6 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -484,7 +484,7 @@ static int
nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res)
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
struct page **page;
int hdrlen, recvd;
int status, nr;
@@ -721,7 +721,7 @@ static int
nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr)
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
unsigned int hdrlen;
u32 *strlen, len;
char *string;
@@ -761,7 +761,7 @@ nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr)
static int
nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res)
{
- struct iovec *iov = req->rq_rcv_buf.head;
+ struct kvec *iov = req->rq_rcv_buf.head;
int status, count, ocount, recvd, hdrlen;
status = ntohl(*p++);
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index a2cd1178e3f98d..a14079f532659a 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -933,7 +933,7 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg
WRITE32(FATTR4_WORD0_FILEID);
WRITE32(0);
- /* set up reply iovec
+ /* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READDIR + status + verifer(2) = 9
*/
@@ -954,7 +954,7 @@ static int encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *r
RESERVE_SPACE(4);
WRITE32(OP_READLINK);
- /* set up reply iovec
+ /* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
* + OP_READLINK + status = 7
*/
@@ -1501,7 +1501,7 @@ static int nfs4_xdr_enc_read(struct rpc_rqst *req, uint32_t *p, struct nfs_reada
if (status)
goto out;
- /* set up reply iovec
+ /* set up reply kvec
* toplevel status + taglen=0 + rescount + OP_PUTFH + status
* + OP_READ + status + eof + datalen = 9
*/
@@ -2785,7 +2785,7 @@ static int decode_putrootfh(struct xdr_stream *xdr)
static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs_readres *res)
{
- struct iovec *iov = req->rq_rcv_buf.head;
+ struct kvec *iov = req->rq_rcv_buf.head;
uint32_t *p;
uint32_t count, eof, recvd, hdrlen;
int status;
@@ -2814,7 +2814,7 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
struct page *page = *rcvbuf->pages;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
unsigned int nr, pglen = rcvbuf->page_len;
uint32_t *end, *entry, *p, *kaddr;
uint32_t len, attrlen, word;
@@ -2897,7 +2897,7 @@ err_unmap:
static int decode_readlink(struct xdr_stream *xdr, struct rpc_rqst *req)
{
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
- struct iovec *iov = rcvbuf->head;
+ struct kvec *iov = rcvbuf->head;
uint32_t *strlen;
unsigned int hdrlen, len;
char *string;
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index f5df8304ff654b..8d6b1f49bc24eb 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -340,7 +340,7 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
if (len > NFSSVC_MAXBLKSIZE)
len = NFSSVC_MAXBLKSIZE;
- /* set up the iovec */
+ /* set up the kvec */
v=0;
while (len > 0) {
pn = rqstp->rq_resused;
@@ -430,7 +430,7 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, u32 *p,
int len;
int avail;
char *old, *new;
- struct iovec *vec;
+ struct kvec *vec;
if (!(p = decode_fh(p, &args->ffh))
|| !(p = decode_filename(p, &args->fname, &args->flen))
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 2016b9c195d649..fb458b6ea7be16 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2519,7 +2519,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, u32 *p, struct nfsd4_compound
/*
* All that remains is to write the tag and operation count...
*/
- struct iovec *iov;
+ struct kvec *iov;
p = resp->tagp;
*p++ = htonl(resp->taglen);
memcpy(p, resp->tag, resp->taglen);
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
index 608a197c1bd2be..9ab14f56d216c1 100644
--- a/fs/nfsd/nfscache.c
+++ b/fs/nfsd/nfscache.c
@@ -41,7 +41,7 @@ static struct svc_cacherep * lru_tail;
static struct svc_cacherep * nfscache;
static int cache_disabled = 1;
-static int nfsd_cache_append(struct svc_rqst *rqstp, struct iovec *vec);
+static int nfsd_cache_append(struct svc_rqst *rqstp, struct kvec *vec);
/*
* locking for the reply cache:
@@ -308,7 +308,7 @@ void
nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, u32 *statp)
{
struct svc_cacherep *rp;
- struct iovec *resv = &rqstp->rq_res.head[0], *cachv;
+ struct kvec *resv = &rqstp->rq_res.head[0], *cachv;
int len;
if (!(rp = rqstp->rq_cacherep) || cache_disabled)
@@ -358,9 +358,9 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, u32 *statp)
* keep a refcount....
*/
static int
-nfsd_cache_append(struct svc_rqst *rqstp, struct iovec *data)
+nfsd_cache_append(struct svc_rqst *rqstp, struct kvec *data)
{
- struct iovec *vec = &rqstp->rq_res.head[0];
+ struct kvec *vec = &rqstp->rq_res.head[0];
if (vec->iov_len + data->iov_len > PAGE_SIZE) {
printk(KERN_WARNING "nfsd: cached reply too large (%Zd).\n",
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index a6a05c3b247cba..d50269bc5a7c52 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -641,7 +641,7 @@ nfsd_read_actor(read_descriptor_t *desc, struct page *page, unsigned long offset
*/
int
nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
- struct iovec *vec, int vlen, unsigned long *count)
+ struct kvec *vec, int vlen, unsigned long *count)
{
struct raparms *ra;
mm_segment_t oldfs;
@@ -673,7 +673,7 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
} else {
oldfs = get_fs();
set_fs(KERNEL_DS);
- err = vfs_readv(&file, vec, vlen, &offset);
+ err = vfs_readv(&file, (struct iovec __user *)vec, vlen, &offset);
set_fs(oldfs);
}
@@ -704,7 +704,7 @@ out:
*/
int
nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
- struct iovec *vec, int vlen,
+ struct kvec *vec, int vlen,
unsigned long cnt, int *stablep)
{
struct svc_export *exp;
@@ -753,7 +753,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
- err = vfs_writev(&file, vec, vlen, &offset);
+ err = vfs_writev(&file, (struct iovec __user *)vec, vlen, &offset);
set_fs(oldfs);
if (err >= 0) {
nfsdstats.io_write += cnt;