Skip to contentSkip to conversation

Remove the redundant rsize calculation in v9fs_file_write()

PATCH Superseded Venkateswararao Jujjuri (JV) 2 participants 2 messages Aug 17, 2010 – Aug 23, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove the redundant rsize calculation in v9fs_file_write()

The same calculation is done in p9_client_write().

---
 fs/9p/vfs_file.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
fs/9p/vfs_file.c +1 -4
index e97c92b..2695491 100644
@@ -235,11 +235,8 @@ v9fs_file_write(struct file *filp, const char __user * data,
 	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);
+									count);
 		if (n <= 0)
 			break;
 		count -= n;
Signature · 1 line
1.6.5.2
#1 lore raw

If we are eliminating the check, we should just eliminate the calculation higher up (and the rsize variable) from this function. Please resubmit with more extensive cleanup. Thanks.

-eric

Quoted 32 lines · Venkateswararao Jujjuri (JV)

The same calculation is done in p9_client_write().

---
 fs/9p/vfs_file.c |    5 +----

 1 files changed, 1 insertions(+), 4 deletions(-)
fs/9p/vfs_file.c +1 -5
index e97c92b..2695491 100644
@@ -235,11 +235,8 @@ v9fs_file_write(struct file *filp, const char __user * data,
        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);
+                                                                       count);
                if (n <= 0)
                        break;
                count -= n;
--

1.6.5.2

------------------------------------------------------------------------------
This SF.net email is sponsored by

Quoted 8 lines

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
V9fs-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/v9fs-developer

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html