diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-16 09:29:30 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 12:06:57 -0400 |
commit | 02da398b950c5d079c20afaa23f322383e96070a (patch) | |
tree | cbc49a6ef8a175df705e6e66627a800a26995af9 /fs/9p | |
parent | 51a87c552dfd428e304c865e24ecbe091556f226 (diff) |
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.c | 20 |
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 @@ | |||
45 | * | 45 | * |
46 | */ | 46 | */ |
47 | 47 | ||
48 | static inline int dt_type(struct p9_stat *mistat) | 48 | static inline int dt_type(struct p9_wstat *mistat) |
49 | { | 49 | { |
50 | unsigned long perm = mistat->mode; | 50 | unsigned long perm = mistat->mode; |
51 | int rettype = DT_REG; | 51 | int rettype = DT_REG; |
@@ -69,7 +69,7 @@ static inline int dt_type(struct p9_stat *mistat) | |||
69 | static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | 69 | static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) |
70 | { | 70 | { |
71 | int over; | 71 | int over; |
72 | struct p9_stat st; | 72 | struct p9_wstat st; |
73 | int err; | 73 | int err; |
74 | struct p9_fid *fid; | 74 | struct p9_fid *fid; |
75 | int buflen; | 75 | int buflen; |
@@ -92,20 +92,24 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
92 | 92 | ||
93 | n = err; | 93 | n = err; |
94 | while (i < n) { | 94 | while (i < n) { |
95 | err = p9_deserialize_stat(statbuf + i, buflen-i, &st, | 95 | err = p9stat_read(statbuf + i, buflen-i, &st, |
96 | fid->clnt->dotu); | 96 | fid->clnt->dotu); |
97 | if (!err) { | 97 | if (err) { |
98 | P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); | ||
98 | err = -EIO; | 99 | err = -EIO; |
100 | p9stat_free(&st); | ||
99 | goto free_and_exit; | 101 | goto free_and_exit; |
100 | } | 102 | } |
101 | 103 | ||
102 | i += err; | 104 | i += st.size+2; |
103 | fid->rdir_fpos += err; | 105 | fid->rdir_fpos += st.size+2; |
104 | 106 | ||
105 | over = filldir(dirent, st.name.str, st.name.len, | 107 | over = filldir(dirent, st.name, strlen(st.name), |
106 | filp->f_pos, v9fs_qid2ino(&st.qid), dt_type(&st)); | 108 | filp->f_pos, v9fs_qid2ino(&st.qid), dt_type(&st)); |
107 | 109 | ||
108 | filp->f_pos += st.size; | 110 | filp->f_pos += st.size+2; |
111 | |||
112 | p9stat_free(&st); | ||
109 | 113 | ||
110 | if (over) { | 114 | if (over) { |
111 | err = 0; | 115 | err = 0; |