This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / nfsd / nfsxdr.c
index 77b18ba..1d582f7 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/xdr.h>
 #include <linux/mm.h>
-#include <linux/vserver/xid.h>
 
 #define NFSDDBG_FACILITY               NFSDDBG_XDR
 
@@ -97,8 +96,6 @@ static inline u32 *
 decode_sattr(u32 *p, struct iattr *iap)
 {
        u32     tmp, tmp1;
-       uid_t   uid = 0;
-       gid_t   gid = 0;
 
        iap->ia_valid = 0;
 
@@ -112,15 +109,12 @@ decode_sattr(u32 *p, struct iattr *iap)
        }
        if ((tmp = ntohl(*p++)) != (u32)-1) {
                iap->ia_valid |= ATTR_UID;
-               uid = tmp;
+               iap->ia_uid = tmp;
        }
        if ((tmp = ntohl(*p++)) != (u32)-1) {
                iap->ia_valid |= ATTR_GID;
-               gid = tmp;
+               iap->ia_gid = tmp;
        }
-       iap->ia_uid = INOXID_UID(1, uid, gid);
-       iap->ia_gid = INOXID_GID(1, uid, gid);
-       iap->ia_xid = INOXID_XID(1, uid, gid, 0);
        if ((tmp = ntohl(*p++)) != (u32)-1) {
                iap->ia_valid |= ATTR_SIZE;
                iap->ia_size = tmp;
@@ -166,10 +160,8 @@ encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp)
        *p++ = htonl(nfs_ftypes[type >> 12]);
        *p++ = htonl((u32) stat.mode);
        *p++ = htonl((u32) stat.nlink);
-       *p++ = htonl((u32) nfsd_ruid(rqstp,
-               XIDINO_UID(XID_TAG(dentry->d_inode), stat.uid, stat.xid)));
-       *p++ = htonl((u32) nfsd_rgid(rqstp,
-               XIDINO_GID(XID_TAG(dentry->d_inode), stat.gid, stat.xid)));
+       *p++ = htonl((u32) nfsd_ruid(rqstp, stat.uid));
+       *p++ = htonl((u32) nfsd_rgid(rqstp, stat.gid));
 
        if (S_ISLNK(type) && stat.size > NFS_MAXPATHLEN) {
                *p++ = htonl(NFS_MAXPATHLEN);
@@ -242,7 +234,7 @@ int
 nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
                                        struct nfsd_readargs *args)
 {
-       unsigned int len;
+       int len;
        int v,pn;
        if (!(p = decode_fh(p, &args->fh)))
                return 0;
@@ -263,8 +255,8 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
                svc_take_page(rqstp);
                args->vec[v].iov_base = page_address(rqstp->rq_respages[pn]);
                args->vec[v].iov_len = len < PAGE_SIZE?len:PAGE_SIZE;
-               len -= args->vec[v].iov_len;
                v++;
+               len -= PAGE_SIZE;
        }
        args->vlen = v;
        return xdr_argsize_check(rqstp, p);
@@ -274,7 +266,7 @@ int
 nfssvc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
                                        struct nfsd_writeargs *args)
 {
-       unsigned int len;
+       int len;
        int v;
        if (!(p = decode_fh(p, &args->fh)))
                return 0;