Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755951Ab3G2Vvs (ORCPT ); Mon, 29 Jul 2013 17:51:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754613Ab3G2Vvr (ORCPT ); Mon, 29 Jul 2013 17:51:47 -0400 Date: Mon, 29 Jul 2013 14:51:41 -0700 From: Zach Brown To: "Kirill A. Shutemov" Cc: Al Viro , Andrew Morton , Hugh Dickins , Lukas Czerner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [PATCH] truncate: drop 'oldsize' truncate_pagecache() parameter Message-ID: <20130729215141.GE32145@lenny.home.zabbo.net> References: <1375099760-7614-1-git-send-email-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1375099760-7614-1-git-send-email-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 30 > @@ -50,7 +50,7 @@ static void adfs_write_failed(struct address_space *mapping, loff_t to) > struct inode *inode = mapping->host; > > if (to > inode->i_size) > - truncate_pagecache(inode, to, inode->i_size); > + truncate_pagecache(inode, inode->i_size); > } All these _write_failed() boiler plate functions still technically use 'to', so I *guess* they can stay :). > @@ -226,7 +226,7 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root, > > oldsize = i_size_read(inode); > btrfs_i_size_write(inode, 0); > - truncate_pagecache(inode, oldsize, 0); > + truncate_pagecache(inode, 0); But after this change 'oldsize' is set but never used. That'll generate a warning on some versions of gcc. Can you redo the patch with an eye to removing unused arguments and variables further up the call stack? - z -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/