diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-10-12 03:55:07 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-10-21 17:56:21 -0400 |
commit | 83aee9e4c2976143f35b3a42ad1faadf58c53ae7 (patch) | |
tree | 568ca76e660645e9762f14c1972514b7f59f247c /fs/xfs/xfs_bmap_util.h | |
parent | 5f8aca8b43f41c4b2d4dc5389124a40cab92b644 (diff) |
xfs: simplify the fallocate path
Call xfs_alloc_file_space or xfs_free_file_space directly from
xfs_file_fallocate instead of going through xfs_change_file_space.
This simplified the code by removing the unessecary marshalling of the
arguments into an xfs_flock64_t structure and allows removing checks that
are already done in the VFS code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.h')
-rw-r--r-- | fs/xfs/xfs_bmap_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_util.h b/fs/xfs/xfs_bmap_util.h index 061260946f7a..77cf5001719b 100644 --- a/fs/xfs/xfs_bmap_util.h +++ b/fs/xfs/xfs_bmap_util.h | |||
@@ -96,6 +96,10 @@ int xfs_bmap_last_extent(struct xfs_trans *tp, struct xfs_inode *ip, | |||
96 | int xfs_change_file_space(struct xfs_inode *ip, int cmd, | 96 | int xfs_change_file_space(struct xfs_inode *ip, int cmd, |
97 | xfs_flock64_t *bf, xfs_off_t offset, | 97 | xfs_flock64_t *bf, xfs_off_t offset, |
98 | int attr_flags); | 98 | int attr_flags); |
99 | int xfs_alloc_file_space(struct xfs_inode *ip, xfs_off_t offset, | ||
100 | xfs_off_t len, int alloc_type); | ||
101 | int xfs_free_file_space(struct xfs_inode *ip, xfs_off_t offset, | ||
102 | xfs_off_t len); | ||
99 | 103 | ||
100 | /* EOF block manipulation functions */ | 104 | /* EOF block manipulation functions */ |
101 | bool xfs_can_free_eofblocks(struct xfs_inode *ip, bool force); | 105 | bool xfs_can_free_eofblocks(struct xfs_inode *ip, bool force); |