CIFS: Fix variable types in cifs_iovec_read/write
Subsystems (2)
PATCH 1/1 CIFS: Fix variable types in cifs_iovec_read/write
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 <[email protected]>
--- fs/cifs/file.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
fs/cifs/file.c +5 -4
@@ -1662,10 +1662,10 @@ static ssize_t cifs_iovec_write(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *poffset) { + unsigned int written; +unsigned long num_pages, npages, i; +size_t copied, len, cur_len;size_t total_written =0 ; -unsigned int written =0 ; -unsigned long num_pages, npages; -size_t copied, len, cur_len, i;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;
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1296478671-22224-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org
let's drop this one.
2011/1/31 Pavel Shilovsky <[email protected]>:
Quoted 40 lines
Variable 'i' should be unsigned long as it's used in circle with
num_pages, and bytes_read/total_written should bessize_taccording to return value.Signed-off-by Pavel Shilovsky <[email protected]>---
fs/cifs/file.c | 9 +++++----1 files changed, 5 insertions(+), 4 deletions(-)fs/cifs/file.c +5
-5@@ -1662,10 +1662,10 @@ static ssize_t cifs_iovec_write(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *poffset) { + unsigned int written; + unsigned long num_pages, npages, i; + size_t copied, len, cur_len; size_t total_written = 0; - unsigned int written = 0; - unsigned long num_pages, npages; - size_t copied, len, cur_len, i; 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; --1.7.1
Signature · 2 lines
Best regards, Pavel Shilovsky.