aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r--fs/9p/vfs_dir.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 17089d1905ff..3893dd307ddb 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -74,7 +74,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
74 struct inode *inode = filp->f_dentry->d_inode; 74 struct inode *inode = filp->f_dentry->d_inode;
75 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode); 75 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
76 struct v9fs_fid *file = filp->private_data; 76 struct v9fs_fid *file = filp->private_data;
77 unsigned int i, n; 77 unsigned int i, n, s;
78 int fid = -1; 78 int fid = -1;
79 int ret = 0; 79 int ret = 0;
80 struct v9fs_stat *mi = NULL; 80 struct v9fs_stat *mi = NULL;
@@ -97,9 +97,9 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
97 n = file->rdir_fcall->params.rread.count; 97 n = file->rdir_fcall->params.rread.count;
98 i = file->rdir_fpos; 98 i = file->rdir_fpos;
99 while (i < n) { 99 while (i < n) {
100 int s = v9fs_deserialize_stat(v9ses, 100 s = v9fs_deserialize_stat(
101 file->rdir_fcall->params.rread.data + i, 101 file->rdir_fcall->params.rread.data + i,
102 n - i, mi, v9ses->maxdata); 102 n - i, mi, v9ses->maxdata, v9ses->extended);
103 103
104 if (s == 0) { 104 if (s == 0) {
105 dprintk(DEBUG_ERROR, 105 dprintk(DEBUG_ERROR,
@@ -141,9 +141,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
141 n = ret; 141 n = ret;
142 i = 0; 142 i = 0;
143 while (i < n) { 143 while (i < n) {
144 int s = v9fs_deserialize_stat(v9ses, 144 s = v9fs_deserialize_stat(fcall->params.rread.data + i,
145 fcall->params.rread.data + i, n - i, mi, 145 n - i, mi, v9ses->maxdata, v9ses->extended);
146 v9ses->maxdata);
147 146
148 if (s == 0) { 147 if (s == 0) {
149 dprintk(DEBUG_ERROR, 148 dprintk(DEBUG_ERROR,
@@ -199,11 +198,9 @@ int v9fs_dir_release(struct inode *inode, struct file *filp)
199 dprintk(DEBUG_VFS, "fidopen: %d v9f->fid: %d\n", fid->fidopen, 198 dprintk(DEBUG_VFS, "fidopen: %d v9f->fid: %d\n", fid->fidopen,
200 fid->fid); 199 fid->fid);
201 200
202 if (v9fs_t_clunk(v9ses, fidnum, NULL)) 201 if (v9fs_t_clunk(v9ses, fidnum))
203 dprintk(DEBUG_ERROR, "clunk failed\n"); 202 dprintk(DEBUG_ERROR, "clunk failed\n");
204 203
205 v9fs_put_idpool(fid->fid, &v9ses->fidpool);
206
207 kfree(fid->rdir_fcall); 204 kfree(fid->rdir_fcall);
208 kfree(fid); 205 kfree(fid);
209 206