linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-V2] [fs/9p] Remove the redundant rsize calculation in v9fs_file_write()
@ 2010-08-24 15:43 Venkateswararao Jujjuri (JV)
  0 siblings, 0 replies; only message in thread
From: Venkateswararao Jujjuri (JV) @ 2010-08-24 15:43 UTC (permalink / raw)
  To: v9fs-developer
  Cc: linux-fsdevel, Venkateswararao Jujjuri (JV), Badari Pulavarty

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>
---
 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 e97c92b..39c8abe 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -219,7 +219,7 @@ static ssize_t
 v9fs_file_write(struct file *filp, const char __user * data,
 		size_t count, loff_t * offset)
 {
-	int n, rsize, total = 0;
+	int n, total = 0;
 	struct p9_fid *fid;
 	struct p9_client *clnt;
 	struct inode *inode = filp->f_path.dentry->d_inode;
@@ -232,14 +232,8 @@ v9fs_file_write(struct file *filp, const char __user * data,
 	fid = filp->private_data;
 	clnt = fid->clnt;
 
-	rsize = fid->iounit ? fid->iounit : clnt->msize - P9_IOHDRSZ;
-
 	do {
-		if (count < rsize)
-			rsize = count;
-
-		n = p9_client_write(fid, NULL, data+total, origin+total,
-									rsize);
+		n = p9_client_write(fid, NULL, data+total, origin+total, count);
 		if (n <= 0)
 			break;
 		count -= n;
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-24 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 15:43 [PATCH-V2] [fs/9p] Remove the redundant rsize calculation in v9fs_file_write() Venkateswararao Jujjuri (JV)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).