diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2011-01-31 08:03:08 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-02-03 23:41:06 -0500 |
commit | 76429c148b939f5a6863c0a024eb8960ae91469a (patch) | |
tree | 8c92827731a52e921755f4a24e9c46ad0882f033 /fs/cifs | |
parent | 9587fcff42f5bece3c0a44066b079235ee73cbb3 (diff) |
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: Pavel Shilovsky <piastry@etersoft.ru>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 74c0a282d012..e964b1cd5dd0 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1662,10 +1662,10 @@ static ssize_t | |||
1662 | cifs_iovec_write(struct file *file, const struct iovec *iov, | 1662 | cifs_iovec_write(struct file *file, const struct iovec *iov, |
1663 | unsigned long nr_segs, loff_t *poffset) | 1663 | unsigned long nr_segs, loff_t *poffset) |
1664 | { | 1664 | { |
1665 | size_t total_written = 0; | 1665 | unsigned int written; |
1666 | unsigned int written = 0; | 1666 | unsigned long num_pages, npages, i; |
1667 | unsigned long num_pages, npages; | 1667 | size_t copied, len, cur_len; |
1668 | size_t copied, len, cur_len, i; | 1668 | ssize_t total_written = 0; |
1669 | struct kvec *to_send; | 1669 | struct kvec *to_send; |
1670 | struct page **pages; | 1670 | struct page **pages; |
1671 | struct iov_iter it; | 1671 | struct iov_iter it; |
@@ -1821,7 +1821,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov, | |||
1821 | { | 1821 | { |
1822 | int rc; | 1822 | int rc; |
1823 | int xid; | 1823 | int xid; |
1824 | unsigned int total_read, bytes_read = 0; | 1824 | ssize_t total_read; |
1825 | unsigned int bytes_read = 0; | ||
1825 | size_t len, cur_len; | 1826 | size_t len, cur_len; |
1826 | int iov_offset = 0; | 1827 | int iov_offset = 0; |
1827 | struct cifs_sb_info *cifs_sb; | 1828 | struct cifs_sb_info *cifs_sb; |