linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [patch 3/5] tmpfs: convert to use the new truncate convention
Date: Wed, 9 Dec 2009 15:45:59 +0100	[thread overview]
Message-ID: <20091209144559.GC7044@quack.suse.cz> (raw)
In-Reply-To: <20091208084109.GC19823@wotan.suse.de>

On Tue 08-12-09 09:41:09, Nick Piggin wrote:
> Cc: Christoph Hellwig <hch@lst.de>
> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Signed-off-by: Nick Piggin <npiggin@suse.de>
...
> @@ -821,11 +824,11 @@ static void shmem_delete_inode(struct in
>  {
>  	struct shmem_inode_info *info = SHMEM_I(inode);
>  
> -	if (inode->i_op->truncate == shmem_truncate) {
> +	if (inode->i_mapping->a_ops == &shmem_aops) {
  How about symlinks here? Originally we've truncated inode for them as
well... BTW the check is really strange. Shouldn't we rather make it
something like S_ISLNK || S_ISREG?

>  		truncate_inode_pages(inode->i_mapping, 0);
>  		shmem_unacct_size(info->flags, inode->i_size);
>  		inode->i_size = 0;
> -		shmem_truncate(inode);
> +		shmem_truncate_range(inode, 0, (loff_t)-1);
>  		if (!list_empty(&info->swaplist)) {
>  			mutex_lock(&shmem_swaplist_mutex);
>  			list_del_init(&info->swaplist);

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2009-12-09 16:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08  8:38 [patch 1/5] fs: truncate introduce new sequence Nick Piggin
2009-12-08  8:39 ` [patch 2/5] fs: convert simple fs to new truncate Nick Piggin
2009-12-09 14:39   ` Jan Kara
2009-12-10  5:15     ` Nick Piggin
2009-12-10  8:44       ` Boaz Harrosh
2009-12-10  7:57         ` Nick Piggin
2009-12-08  8:41 ` [patch 3/5] tmpfs: convert to use the new truncate convention Nick Piggin
2009-12-09 14:45   ` Jan Kara [this message]
2009-12-10  0:48     ` Nick Piggin
2009-12-08  8:42 ` [patch 4/5] ext2: " Nick Piggin
2009-12-09 14:57   ` Jan Kara
2009-12-10  1:11     ` Nick Piggin
2009-12-10 10:20       ` Jan Kara
2009-12-08  8:43 ` [patch 5/5] fat: " Nick Piggin
2009-12-09 15:08   ` Jan Kara
2009-12-09 14:38 ` [patch 1/5] fs: truncate introduce new sequence Jan Kara

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=20091209144559.GC7044@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --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;
as well as URLs for NNTP newsgroup(s).