patch-2.4.9 linux/fs/nfsd/nfsxdr.c

Next file: linux/fs/ntfs/Makefile
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/fs/nfsd/nfsxdr.c linux/fs/nfsd/nfsxdr.c
@@ -137,8 +137,7 @@
 encode_fattr(struct svc_rqst *rqstp, u32 *p, struct inode *inode)
 {
 	int type = (inode->i_mode & S_IFMT);
-	if (!inode)
-		return 0;
+
 	*p++ = htonl(nfs_ftypes[type >> 12]);
 	*p++ = htonl((u32) inode->i_mode);
 	*p++ = htonl((u32) inode->i_nlink);
@@ -335,8 +334,7 @@
 nfssvc_encode_attrstat(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_attrstat *resp)
 {
-	if (!(p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode)))
-		return 0;
+	p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode);
 	return xdr_ressize_check(rqstp, p);
 }
 
@@ -344,9 +342,8 @@
 nfssvc_encode_diropres(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_diropres *resp)
 {
-	if (!(p = encode_fh(p, &resp->fh))
-	 || !(p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode)))
-		return 0;
+	p = encode_fh(p, &resp->fh);
+	p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode);
 	return xdr_ressize_check(rqstp, p);
 }
 
@@ -363,8 +360,7 @@
 nfssvc_encode_readres(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_readres *resp)
 {
-	if (!(p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode)))
-		return 0;
+	p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode);
 	*p++ = htonl(resp->count);
 	p += XDR_QUADLEN(resp->count);
 
@@ -395,7 +391,7 @@
 
 int
 nfssvc_encode_entry(struct readdir_cd *cd, const char *name,
-		    int namlen, off_t offset, ino_t ino, unsigned int d_type)
+		    int namlen, loff_t offset, ino_t ino, unsigned int d_type)
 {
 	u32	*p = cd->buffer;
 	int	buflen, slen;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)