Commit 76429c14 authored by Pavel Shilovsky's avatar Pavel Shilovsky Committed by Steve French

CIFS: Fix variable types in cifs_iovec_read/write (try #2)

Variable 'i' should be unsigned long as it's used in circle with num_pages,
and bytes_read/total_written should be ssize_t according to return value.
Signed-off-by: default avatarPavel Shilovsky <piastry@etersoft.ru>
Reviewed-by: default avatarShirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 9587fcff
...@@ -1662,10 +1662,10 @@ static ssize_t ...@@ -1662,10 +1662,10 @@ static ssize_t
cifs_iovec_write(struct file *file, const struct iovec *iov, cifs_iovec_write(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *poffset) unsigned long nr_segs, loff_t *poffset)
{ {
size_t total_written = 0; unsigned int written;
unsigned int written = 0; unsigned long num_pages, npages, i;
unsigned long num_pages, npages; size_t copied, len, cur_len;
size_t copied, len, cur_len, i; ssize_t total_written = 0;
struct kvec *to_send; struct kvec *to_send;
struct page **pages; struct page **pages;
struct iov_iter it; struct iov_iter it;
...@@ -1821,7 +1821,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov, ...@@ -1821,7 +1821,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
{ {
int rc; int rc;
int xid; int xid;
unsigned int total_read, bytes_read = 0; ssize_t total_read;
unsigned int bytes_read = 0;
size_t len, cur_len; size_t len, cur_len;
int iov_offset = 0; int iov_offset = 0;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment