diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-11-14 17:42:47 +1100 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-14 15:11:19 -0600 |
commit | f5b8911b67eb4f15d95d5e5324d376d4a49d56e8 (patch) | |
tree | 35c98fdcbefd3c8a52d062f73775cde9aaac75d6 /fs/xfs/xfs_fs_subr.c | |
parent | de497688daaabbab425a8a969528272ec1d962a6 (diff) | |
download | linux-f5b8911b67eb4f15d95d5e5324d376d4a49d56e8.tar.gz linux-f5b8911b67eb4f15d95d5e5324d376d4a49d56e8.tar.bz2 linux-f5b8911b67eb4f15d95d5e5324d376d4a49d56e8.zip |
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_fs_subr.c')
-rw-r--r-- | fs/xfs/xfs_fs_subr.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/xfs/xfs_fs_subr.c b/fs/xfs/xfs_fs_subr.c index 652b875a9d4c..d49de3d70456 100644 --- a/fs/xfs/xfs_fs_subr.c +++ b/fs/xfs/xfs_fs_subr.c @@ -25,18 +25,6 @@ * note: all filemap functions return negative error codes. These * need to be inverted before returning to the xfs core functions. */ -void -xfs_tosspages( - xfs_inode_t *ip, - xfs_off_t first, - xfs_off_t last, - int fiopt) -{ - /* can't toss partial tail pages, so mask them out */ - last &= ~(PAGE_SIZE - 1); - truncate_inode_pages_range(VFS_I(ip)->i_mapping, first, last - 1); -} - int xfs_flushinval_pages( xfs_inode_t *ip, |