xfs
[Top] [All Lists]

Re: [PATCH 02/32 V2] xfs: remove xfs_tosspages

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 02/32 V2] xfs: remove xfs_tosspages
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 15 Nov 2012 11:22:12 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121114064247.GC1710@dastard>
References: <1352721264-3700-1-git-send-email-david@xxxxxxxxxxxxx> <1352721264-3700-3-git-send-email-david@xxxxxxxxxxxxx> <20121114064247.GC1710@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Nov 14, 2012 at 05:42:47PM +1100, Dave Chinner wrote:
> xfs: remove xfs_tosspages
> 
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> It's a buggy, unnecessary wrapper that is duplicating
> truncate_pagecache_range().
> 
> When replacing the call in xfs_change_file_space(), also ensure that
> the length being allocated/freed is always positive before making
> any changes. These checks are done in the lower extent manipulation
> functions, too, but we need to do them before any page cache
> operations.
> 
> Reported-by: Andrew Dahl <adahl@xxxxxxx>
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good as long as Andrews fix is included.

I wonder if we should just fix the two places with checks for easy
backportability in a first patch and then have a second on top to
kill the useless wrapper?

Either way,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>