summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-16 08:29:30 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 11:06:57 -0500
commit02da398b950c5d079c20afaa23f322383e96070a (patch)
treecbc49a6ef8a175df705e6e66627a800a26995af9 /fs/9p
parent51a87c552dfd428e304c865e24ecbe091556f226 (diff)
downloadlwn-02da398b950c5d079c20afaa23f322383e96070a.tar.gz
lwn-02da398b950c5d079c20afaa23f322383e96070a.zip
9p: eliminate depricated conv functions
Remove depricated conv functions which have been replaced with new protocol routines. This patch also reworks the one instance of the file-system code which directly calls conversion routines (to accomplish unpacking dirreads). Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_dir.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 276aed625929..873cd31baa47 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -45,7 +45,7 @@
*
*/
-static inline int dt_type(struct p9_stat *mistat)
+static inline int dt_type(struct p9_wstat *mistat)
{
unsigned long perm = mistat->mode;
int rettype = DT_REG;
@@ -69,7 +69,7 @@ static inline int dt_type(struct p9_stat *mistat)
static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
int over;
- struct p9_stat st;
+ struct p9_wstat st;
int err;
struct p9_fid *fid;
int buflen;
@@ -92,20 +92,24 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
n = err;
while (i < n) {
- err = p9_deserialize_stat(statbuf + i, buflen-i, &st,
+ err = p9stat_read(statbuf + i, buflen-i, &st,
fid->clnt->dotu);
- if (!err) {
+ if (err) {
+ P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);
err = -EIO;
+ p9stat_free(&st);
goto free_and_exit;
}
- i += err;
- fid->rdir_fpos += err;
+ i += st.size+2;
+ fid->rdir_fpos += st.size+2;
- over = filldir(dirent, st.name.str, st.name.len,
+ over = filldir(dirent, st.name, strlen(st.name),
filp->f_pos, v9fs_qid2ino(&st.qid), dt_type(&st));
- filp->f_pos += st.size;
+ filp->f_pos += st.size+2;
+
+ p9stat_free(&st);
if (over) {
err = 0;