xfs: remove xfs_tosspages
authorDave Chinner <dchinner@redhat.com>
Wed, 14 Nov 2012 06:42:47 +0000 (17:42 +1100)
committerBen Myers <bpm@sgi.com>
Wed, 14 Nov 2012 21:11:19 +0000 (15:11 -0600)
commitf5b8911b67eb4f15d95d5e5324d376d4a49d56e8
tree35c98fdcbefd3c8a52d062f73775cde9aaac75d6
parentde497688daaabbab425a8a969528272ec1d962a6
xfs: remove xfs_tosspages

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@sgi.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-By: Andrew Dahl <adahl@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_fs_subr.c
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.h