]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Clean out routines that were obsoleted by previous
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Tue, 28 May 2002 13:04:06 +0000 (06:04 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 28 May 2002 13:04:06 +0000 (06:04 -0700)
Remove obsolete NFS and RPC routines.
Remove 'inline' attribute from xdr_decode_fattr().

fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c
include/linux/sunrpc/xprt.h
net/sunrpc/xdr.c
net/sunrpc/xprt.c

index d08105009783bd364972840c49aa94bc013b8e51..660fb7f27c07003f02ac6284107ecfa5e9ff7007 100644 (file)
@@ -87,17 +87,6 @@ xdr_decode_fhandle(u32 *p, struct nfs_fh *fhandle)
        return p + XDR_QUADLEN(NFS2_FHSIZE);
 }
 
-static inline u32 *
-xdr_decode_string2(u32 *p, char **string, unsigned int *len,
-                       unsigned int maxlen)
-{
-       *len = ntohl(*p++);
-       if (*len > maxlen)
-               return NULL;
-       *string = (char *) p;
-       return p + XDR_QUADLEN(*len);
-}
-
 static inline u32*
 xdr_decode_time(u32 *p, u64 *timep)
 {
@@ -106,7 +95,7 @@ xdr_decode_time(u32 *p, u64 *timep)
        return p;
 }
 
-static inline u32 *
+static u32 *
 xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
 {
        fattr->type = (enum nfs_ftype) ntohl(*p++);
index cbc7c93a9158b77e68b632a1cf4542e35d21912a..d13b938d9b70de369aaf61c50b66947e0709d590 100644 (file)
@@ -153,18 +153,7 @@ xdr_encode_time3(u32 *p, u64 time)
        return p;
 }
 
-static inline u32 *
-xdr_decode_string2(u32 *p, char **string, unsigned int *len,
-                       unsigned int maxlen)
-{
-       *len = ntohl(*p++);
-       if (*len > maxlen)
-               return NULL;
-       *string = (char *) p;
-       return p + XDR_QUADLEN(*len);
-}
-
-static inline u32 *
+static u32 *
 xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
 {
        unsigned int    type;
index 79c687c4d4c07e2eea28a3a9c8c75a4c74706b25..a8de87ccaec9efb6f862b8159c862ef4c6a213d6 100644 (file)
@@ -65,15 +65,6 @@ struct rpc_timeout {
        unsigned char           to_exponential;
 };
 
-/*
- * This is the RPC buffer
- */
-struct rpc_iov {
-       struct iovec            io_vec[MAX_IOVEC];
-       unsigned int            io_nr;
-       unsigned int            io_len;
-};
-
 /*
  * This describes a complete RPC request
  */
index ecfe6991a01d94b9a0207bb11cac2fa0d5cef296..069495179e3cc7b05e6bdd4842d391ea16062ee5 100644 (file)
@@ -173,24 +173,6 @@ void xdr_shift_iovec(struct iovec *iov, int nr, size_t len)
        }
 }
 
-/*
- * Zero the last n bytes in an iovec array of 'nr' elements
- */
-void xdr_zero_iovec(struct iovec *iov, int nr, size_t n)
-{
-       struct iovec *pvec;
-
-       for (pvec = iov + nr - 1; n && nr > 0; nr--, pvec--) {
-               if (n < pvec->iov_len) {
-                       memset((char *)pvec->iov_base + pvec->iov_len - n, 0, n);
-                       n = 0;
-               } else {
-                       memset(pvec->iov_base, 0, pvec->iov_len);
-                       n -= pvec->iov_len;
-               }
-       }
-}
-
 /*
  * Map a struct xdr_buf into an iovec array.
  */
index 10d6a1483c53bbcf75975486c32c8c37e7c5b1ee..aa1eea22dcf19e42dee96e2258d0022521503711 100644 (file)
@@ -130,41 +130,6 @@ xprt_from_sock(struct sock *sk)
        return (struct rpc_xprt *) sk->user_data;
 }
 
-/*
- *     Adjust the iovec to move on 'n' bytes
- */
-extern inline void
-xprt_move_iov(struct msghdr *msg, struct iovec *niv, unsigned amount)
-{
-       struct iovec *iv=msg->msg_iov;
-       int i;
-       
-       /*
-        *      Eat any sent iovecs
-        */
-       while (iv->iov_len <= amount) {
-               amount -= iv->iov_len;
-               iv++;
-               msg->msg_iovlen--;
-       }
-
-       /*
-        *      And chew down the partial one
-        */
-       niv[0].iov_len = iv->iov_len-amount;
-       niv[0].iov_base =((unsigned char *)iv->iov_base)+amount;
-       iv++;
-
-       /*
-        *      And copy any others
-        */
-       for(i = 1; i < msg->msg_iovlen; i++)
-               niv[i]=*iv++;
-
-       msg->msg_iov=niv;
-}
-
 /*
  * Serialize write access to sockets, in order to prevent different
  * requests from interfering with each other.