提交 8d40fa24 编写于 作者: J jvrao 提交者: Eric Van Hensbergen

fs/9p: Remove the redundant rsize calculation in v9fs_file_write()

the same calculation is done in p9_client_write
Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 3e24ad2f
...@@ -221,7 +221,7 @@ v9fs_file_write(struct file *filp, const char __user * data, ...@@ -221,7 +221,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
{ {
ssize_t retval; ssize_t retval;
size_t total = 0; size_t total = 0;
int n, rsize; int n;
struct p9_fid *fid; struct p9_fid *fid;
struct p9_client *clnt; struct p9_client *clnt;
struct inode *inode = filp->f_path.dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
...@@ -234,8 +234,6 @@ v9fs_file_write(struct file *filp, const char __user * data, ...@@ -234,8 +234,6 @@ v9fs_file_write(struct file *filp, const char __user * data,
fid = filp->private_data; fid = filp->private_data;
clnt = fid->clnt; clnt = fid->clnt;
rsize = fid->iounit ? fid->iounit : clnt->msize - P9_IOHDRSZ;
retval = generic_write_checks(filp, &origin, &count, 0); retval = generic_write_checks(filp, &origin, &count, 0);
if (retval) if (retval)
goto out; goto out;
...@@ -248,11 +246,7 @@ v9fs_file_write(struct file *filp, const char __user * data, ...@@ -248,11 +246,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
goto out; goto out;
do { do {
if (count < rsize) n = p9_client_write(fid, NULL, data+total, origin+total, count);
rsize = count;
n = p9_client_write(fid, NULL, data+total, origin+total,
rsize);
if (n <= 0) if (n <= 0)
break; break;
count -= n; count -= n;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册