]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
fs/9p: Remove the redundant rsize calculation in v9fs_file_write()
authorjvrao <jvrao@linux.vnet.ibm.com>
Mon, 30 Aug 2010 18:23:20 +0000 (13:23 -0500)
committerEric Van Hensbergen <ericvh@gmail.com>
Thu, 28 Oct 2010 14:08:45 +0000 (09:08 -0500)
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>
fs/9p/vfs_file.c

index 89c44e92022cfe22cae1eccd21ebf8fd9b4b4ecf..f455c45a8c5fe15a90d83a185a391aad8d1c52d7 100644 (file)
@@ -221,7 +221,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
 {
        ssize_t retval;
        size_t total = 0;
-       int n, rsize;
+       int n;
        struct p9_fid *fid;
        struct p9_client *clnt;
        struct inode *inode = filp->f_path.dentry->d_inode;
@@ -234,8 +234,6 @@ 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;
-
        retval = generic_write_checks(filp, &origin, &count, 0);
        if (retval)
                goto out;
@@ -248,11 +246,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
                goto out;
 
        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;