diff options
author | jvrao <jvrao@linux.vnet.ibm.com> | 2010-08-30 14:23:20 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-10-28 10:08:45 -0400 |
commit | 8d40fa2492eb3dcf02468eef2f6bba450be42b22 (patch) | |
tree | 7ef6d3d02bbb26d23c2543fca3d35bb296955b79 /fs/9p | |
parent | 3e24ad2ff9d477f949acd0982cf12e58812210cb (diff) |
fs/9p: Remove the redundant rsize calculation in v9fs_file_write()
the same calculation is done in p9_client_write
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_file.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 89c44e92022c..f455c45a8c5f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c | |||
@@ -221,7 +221,7 @@ v9fs_file_write(struct file *filp, const char __user * data, | |||
221 | { | 221 | { |
222 | ssize_t retval; | 222 | ssize_t retval; |
223 | size_t total = 0; | 223 | size_t total = 0; |
224 | int n, rsize; | 224 | int n; |
225 | struct p9_fid *fid; | 225 | struct p9_fid *fid; |
226 | struct p9_client *clnt; | 226 | struct p9_client *clnt; |
227 | struct inode *inode = filp->f_path.dentry->d_inode; | 227 | struct inode *inode = filp->f_path.dentry->d_inode; |
@@ -234,8 +234,6 @@ v9fs_file_write(struct file *filp, const char __user * data, | |||
234 | fid = filp->private_data; | 234 | fid = filp->private_data; |
235 | clnt = fid->clnt; | 235 | clnt = fid->clnt; |
236 | 236 | ||
237 | rsize = fid->iounit ? fid->iounit : clnt->msize - P9_IOHDRSZ; | ||
238 | |||
239 | retval = generic_write_checks(filp, &origin, &count, 0); | 237 | retval = generic_write_checks(filp, &origin, &count, 0); |
240 | if (retval) | 238 | if (retval) |
241 | goto out; | 239 | goto out; |
@@ -248,11 +246,7 @@ v9fs_file_write(struct file *filp, const char __user * data, | |||
248 | goto out; | 246 | goto out; |
249 | 247 | ||
250 | do { | 248 | do { |
251 | if (count < rsize) | 249 | n = p9_client_write(fid, NULL, data+total, origin+total, count); |
252 | rsize = count; | ||
253 | |||
254 | n = p9_client_write(fid, NULL, data+total, origin+total, | ||
255 | rsize); | ||
256 | if (n <= 0) | 250 | if (n <= 0) |
257 | break; | 251 | break; |
258 | count -= n; | 252 | count -= n; |