diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-11-14 06:42:47 (GMT) |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-14 21:11:19 (GMT) |
commit | f5b8911b67eb4f15d95d5e5324d376d4a49d56e8 (patch) | |
tree | 35c98fdcbefd3c8a52d062f73775cde9aaac75d6 /fs/xfs/xfs_dfrag.c | |
parent | de497688daaabbab425a8a969528272ec1d962a6 (diff) | |
download | linux-f5b8911b67eb4f15d95d5e5324d376d4a49d56e8.tar.xz |
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>
Diffstat (limited to 'fs/xfs/xfs_dfrag.c')
-rw-r--r-- | fs/xfs/xfs_dfrag.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index b9b8646..b2c63a2 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -315,8 +315,7 @@ xfs_swap_extents( * are safe. We don't really care if non-io related * fields change. */ - - xfs_tosspages(ip, 0, -1, FI_REMAPF); + truncate_pagecache_range(VFS_I(ip), 0, -1); tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); if ((error = xfs_trans_reserve(tp, 0, |