@@ -160,7 +160,7 @@ v9fs_file_readn(struct file *filp, char *data, char __user *udata, u32 count,
offset += n;
count -= n;
total += n;
- } while (count > 0 && n == (fid->clnt->msize - P9_IOHDRSZ));
+ } while (count > 0 && n == fid->iounit);
if (n < 0)
total = n;
@@ -187,11 +187,7 @@ v9fs_file_read(struct file *filp, char __user *udata, size_t count,
P9_DPRINTK(P9_DEBUG_VFS, "count %zu offset %lld\n", count, *offset);
fid = filp->private_data;
- if (count > (fid->clnt->msize - P9_IOHDRSZ))
- ret = v9fs_file_readn(filp, NULL, udata, count, *offset);
- else
- ret = p9_client_read(fid, NULL, udata, *offset, count);
-
+ ret = v9fs_file_readn(filp, NULL, udata, count, *offset);
if (ret > 0)
*offset += ret;
@@ -225,8 +221,6 @@ v9fs_file_write(struct file *filp, const char __user * data,
clnt = fid->clnt;
rsize = fid->iounit;
- if (!rsize || rsize > clnt->msize-P9_IOHDRSZ)
- rsize = clnt->msize - P9_IOHDRSZ;
do {
if (count < rsize)