diff options
author | Latchesar Ionkov <lucho@ionkov.net> | 2006-01-08 04:04:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:05 -0500 |
commit | 3cf6429a26da5c4d7b795e6d0f8f56ed2e4fdfc0 (patch) | |
tree | a8d856763fd9a0536519634c93ab92da684107fa /fs/9p/vfs_dir.c | |
parent | f5ef3c105bee3a52486d7b55cef3330fcde9bca6 (diff) |
[PATCH] v9fs: new multiplexer implementation
New multiplexer implementation. Decreases the number of kernel threads
required. Better handling when the user process receives a signal.
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r-- | fs/9p/vfs_dir.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 17089d1905f..3893dd307dd 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 | ||