diff options
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 0910cb75b65d..4f443703065e 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -864,6 +864,7 @@ xfs_alloc_file_space( | |||
864 | xfs_filblks_t allocatesize_fsb; | 864 | xfs_filblks_t allocatesize_fsb; |
865 | xfs_extlen_t extsz, temp; | 865 | xfs_extlen_t extsz, temp; |
866 | xfs_fileoff_t startoffset_fsb; | 866 | xfs_fileoff_t startoffset_fsb; |
867 | xfs_fileoff_t endoffset_fsb; | ||
867 | int nimaps; | 868 | int nimaps; |
868 | int quota_flag; | 869 | int quota_flag; |
869 | int rt; | 870 | int rt; |
@@ -891,7 +892,8 @@ xfs_alloc_file_space( | |||
891 | imapp = &imaps[0]; | 892 | imapp = &imaps[0]; |
892 | nimaps = 1; | 893 | nimaps = 1; |
893 | startoffset_fsb = XFS_B_TO_FSBT(mp, offset); | 894 | startoffset_fsb = XFS_B_TO_FSBT(mp, offset); |
894 | allocatesize_fsb = XFS_B_TO_FSB(mp, count); | 895 | endoffset_fsb = XFS_B_TO_FSB(mp, offset + count); |
896 | allocatesize_fsb = endoffset_fsb - startoffset_fsb; | ||
895 | 897 | ||
896 | /* | 898 | /* |
897 | * Allocate file space until done or until there is an error | 899 | * Allocate file space until done or until there is an error |