From patchwork Mon Jan 31 13:03:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 519491 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0VD3Ge3032283 for ; Mon, 31 Jan 2011 13:03:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754190Ab1AaNDP (ORCPT ); Mon, 31 Jan 2011 08:03:15 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:42618 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736Ab1AaNDP (ORCPT ); Mon, 31 Jan 2011 08:03:15 -0500 Received: by fxm20 with SMTP id 20so5569065fxm.19 for ; Mon, 31 Jan 2011 05:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer; bh=wlT5aHpcXG8kgh6DnK2suc6lWW+/0ZoLo6Nn9EbnUgQ=; b=RMxz1Ml3TfH50FqSaQU2lFD15Jfm6kXYZjLQVgxjaYbINlYflwdWChIT8VnApDTdbN nTPdm2z4WV8USn4FbNrCViuwYB6Be7NIJ5du0bjan0js7fC+HspQbY+JhgfXSOXh5URw 1e9q6dzbAeN1PeGDSrUKedbl25MUhEA/AKx0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer; b=jNamlwWm8AL8rYhZCJwRMWbDej5PDxJp9dTBHfy12PPVxXWaRWng60TohDc7dN9ZMh eAR2PTmNObjPpH6jPokuZJQ6x8yMP2es2JolbQ95oxxgAuc69TGZYikLmOUsRv3KgbCR 3+fFsldlyFZAGi05Y5UWuD3B33IglgWNjNnGI= Received: by 10.223.101.195 with SMTP id d3mr1129329fao.21.1296478994030; Mon, 31 Jan 2011 05:03:14 -0800 (PST) Received: from localhost.localdomain ([79.126.73.39]) by mx.google.com with ESMTPS id j12sm3252478fax.33.2011.01.31.05.03.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Jan 2011 05:03:13 -0800 (PST) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH] CIFS: Fix variable types in cifs_iovec_read/write (try #2) Date: Mon, 31 Jan 2011 16:03:08 +0300 Message-Id: <1296478988-22307-1-git-send-email-piastry@etersoft.ru> X-Mailer: git-send-email 1.7.1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 31 Jan 2011 13:03:16 +0000 (UTC) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 74c0a28..e964b1c 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -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;