linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zach Brown <zab@redhat.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	Lukas Czerner <lczerner@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill@shutemov.name>
Subject: Re: [PATCH] truncate: drop 'oldsize' truncate_pagecache() parameter
Date: Mon, 29 Jul 2013 14:51:41 -0700	[thread overview]
Message-ID: <20130729215141.GE32145@lenny.home.zabbo.net> (raw)
In-Reply-To: <1375099760-7614-1-git-send-email-kirill.shutemov@linux.intel.com>

> @@ -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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-07-29 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 12:09 Kirill A. Shutemov
2013-07-29 21:51 ` Zach Brown [this message]
2013-07-30 11:42   ` [PATCHv2] " Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130729215141.GE32145@lenny.home.zabbo.net \
    --to=zab@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=lczerner@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox