From patchwork Tue Sep 22 21:00:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Moise <00moses.alexander00@gmail.com> X-Patchwork-Id: 7242451 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 583579F443 for ; Tue, 22 Sep 2015 18:01:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9779920680 for ; Tue, 22 Sep 2015 18:01:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBF9920666 for ; Tue, 22 Sep 2015 18:01:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933965AbbIVSAc (ORCPT ); Tue, 22 Sep 2015 14:00:32 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36593 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932429AbbIVSAa (ORCPT ); Tue, 22 Sep 2015 14:00:30 -0400 Received: by wicgb1 with SMTP id gb1so171645419wic.1; Tue, 22 Sep 2015 11:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=0z99F2EX8anUCaB7uNTlTfQuMx/1tnVvmbLF7/gVCnE=; b=otoqYD1UpW5YQGirCqJNBydrDaghHHcWNq+CsLpq7jIFShC4ecGuLgyf6x8aZ+fY9m SYh1LOPhyC+EJ1ipVpmIamKYI2V+EOZJCWyZypqaW0OztM1HIsNLqC+WjDcNHtiP8o+z YP/3k1zCUT8y8obJ2LSrrsdoR7mI9hvdMUgaEyB4qu4nRbAqBrK6jCFEk49kAEOwQldB s9TZXJyIp7WDn7MQKWfKOJ6bKE2RmZX8r3Qmb+YUxPjGHHHeUCgB4cTggMYOJGx+nCM1 U7G3wHB+wXK2Tblyqa8m4pND4w3Z961OMA7Oi80yagSKKdjrEsSKh7dsEas+u/lXaEEi 9B/w== X-Received: by 10.194.133.129 with SMTP id pc1mr30901772wjb.148.1442944829017; Tue, 22 Sep 2015 11:00:29 -0700 (PDT) Received: from gmail.com ([188.24.228.168]) by smtp.gmail.com with ESMTPSA id ej5sm3055693wjd.22.2015.09.22.11.00.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 11:00:28 -0700 (PDT) Date: Tue, 22 Sep 2015 21:00:07 +0000 From: Alexandru Moise <00moses.alexander00@gmail.com> To: clm@fb.com Cc: jbacik@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, 00moses.alexander00@gmail.com Subject: [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int Message-ID: <20150922210007.GA27786@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP rsv_count ultimately gets passed to start_transaction() which now takes an unsigned int as its num_items parameter. The value of rsv_count should always be positive so declare it as being unsigned. Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Reviewed-by: David Sterba --- v2: followed dave's suggestions of all num_items equivalents to be unsigned ints. fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index b823fac..6af5103 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2266,7 +2266,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) u64 drop_end; int ret = 0; int err = 0; - int rsv_count; + unsigned int rsv_count; bool same_page; bool no_holes = btrfs_fs_incompat(root->fs_info, NO_HOLES); u64 ino_size;