From c8030e55d2cf53f4ef2349aeae345cbf222cd93b Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 2 Sep 2004 03:52:49 -0700 Subject: [PATCH] NFS: clean up the new symlink code - Now that the VFS no longer uses it, we don't need to cache the symlink string length. - Make ->readlink() take page offset+length arguments - Fix up page under/overflow checking on the readlink XDR code so that it matches read/write. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds --- include/linux/nfs_xdr.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 90fbb9d1514f..f1402347c509 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -361,7 +361,8 @@ struct nfs_diropok { struct nfs_readlinkargs { struct nfs_fh * fh; - unsigned int count; + unsigned int pgbase; + unsigned int pglen; struct page ** pages; }; @@ -455,7 +456,8 @@ struct nfs3_accessres { struct nfs3_readlinkargs { struct nfs_fh * fh; - unsigned int count; + unsigned int pgbase; + unsigned int pglen; struct page ** pages; }; @@ -570,7 +572,8 @@ struct nfs4_readdir_res { struct nfs4_readlink { const struct nfs_fh * fh; - u32 count; /* zero-copy data */ + unsigned int pgbase; + unsigned int pglen; /* zero-copy data */ struct page ** pages; /* zero-copy data */ }; @@ -673,7 +676,8 @@ struct nfs_rpc_ops { int (*lookup) (struct inode *, struct qstr *, struct nfs_fh *, struct nfs_fattr *); int (*access) (struct inode *, struct nfs_access_entry *); - int (*readlink)(struct inode *, struct page *); + int (*readlink)(struct inode *, struct page *, unsigned int, + unsigned int); int (*read) (struct nfs_read_data *); int (*write) (struct nfs_write_data *); int (*commit) (struct nfs_write_data *); -- cgit v1.2.3