]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
CIFS: Fix variable types in cifs_iovec_read/write (try #2)
authorPavel Shilovsky <piastry@etersoft.ru>
Mon, 31 Jan 2011 13:03:08 +0000 (16:03 +0300)
committerSteve French <sfrench@us.ibm.com>
Fri, 4 Feb 2011 04:41:06 +0000 (04:41 +0000)
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>
fs/cifs/file.c

index 74c0a282d012eeb96c3022b1a4616a47f4859636..e964b1cd5dd092bda83d274da53248a50dfd0ba3 100644 (file)
@@ -1662,10 +1662,10 @@ static ssize_t
 cifs_iovec_write(struct file *file, const struct iovec *iov,
                 unsigned long nr_segs, loff_t *poffset)
 {
-       size_t total_written = 0;
-       unsigned int written = 0;
-       unsigned long num_pages, npages;
-       size_t copied, len, cur_len, i;
+       unsigned int written;
+       unsigned long num_pages, npages, i;
+       size_t copied, len, cur_len;
+       ssize_t total_written = 0;
        struct kvec *to_send;
        struct page **pages;
        struct iov_iter it;
@@ -1821,7 +1821,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
 {
        int rc;
        int xid;
-       unsigned int total_read, bytes_read = 0;
+       ssize_t total_read;
+       unsigned int bytes_read = 0;
        size_t len, cur_len;
        int iov_offset = 0;
        struct cifs_sb_info *cifs_sb;