aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2011-09-18 16:40:55 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:05 -0400
commit1b16447ba24ae39c7fe7133fcdcb4f174dec1901 (patch)
tree5c5f6c00bfe189882a7ba170466b1904c66e74ae /fs/xfs/xfs_bmap.c
parenta5bd606ba65f24e5990edfc0e7b52702720ee6fa (diff)
xfs: pass bmalloca structure to xfs_bmap_isaeof
All the variables xfs_bmap_isaeof() is passed are contained within the xfs_bmalloca structure. Pass that instead. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r--fs/xfs/xfs_bmap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 0c9be0ed606e..e2eb3ba5b420 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -3867,22 +3867,21 @@ xfs_bmap_last_extent(
3867 * blocks at the end of the file which do not start at the previous data block, 3867 * blocks at the end of the file which do not start at the previous data block,
3868 * we will try to align the new blocks at stripe unit boundaries. 3868 * we will try to align the new blocks at stripe unit boundaries.
3869 * 3869 *
3870 * Returns 0 in *aeof if the file (fork) is empty as any new write will be at, 3870 * Returns 0 in bma->aeof if the file (fork) is empty as any new write will be
3871 * or past the EOF. 3871 * at, or past the EOF.
3872 */ 3872 */
3873STATIC int 3873STATIC int
3874xfs_bmap_isaeof( 3874xfs_bmap_isaeof(
3875 struct xfs_inode *ip, 3875 struct xfs_bmalloca *bma,
3876 xfs_fileoff_t off, 3876 int whichfork)
3877 int whichfork,
3878 char *aeof)
3879{ 3877{
3880 struct xfs_bmbt_irec rec; 3878 struct xfs_bmbt_irec rec;
3881 int is_empty; 3879 int is_empty;
3882 int error; 3880 int error;
3883 3881
3884 *aeof = 0; 3882 bma->aeof = 0;
3885 error = xfs_bmap_last_extent(NULL, ip, whichfork, &rec, &is_empty); 3883 error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
3884 &is_empty);
3886 if (error || is_empty) 3885 if (error || is_empty)
3887 return error; 3886 return error;
3888 3887
@@ -3890,8 +3889,9 @@ xfs_bmap_isaeof(
3890 * Check if we are allocation or past the last extent, or at least into 3889 * Check if we are allocation or past the last extent, or at least into
3891 * the last delayed allocated extent. 3890 * the last delayed allocated extent.
3892 */ 3891 */
3893 *aeof = off >= rec.br_startoff + rec.br_blockcount || 3892 bma->aeof = bma->off >= rec.br_startoff + rec.br_blockcount ||
3894 (off >= rec.br_startoff && isnullstartblock(rec.br_startblock)); 3893 (bma->off >= rec.br_startoff &&
3894 isnullstartblock(rec.br_startblock));
3895 return 0; 3895 return 0;
3896} 3896}
3897 3897
@@ -4658,7 +4658,7 @@ xfs_bmapi_allocate(
4658 */ 4658 */
4659 if (mp->m_dalign && alen >= mp->m_dalign && 4659 if (mp->m_dalign && alen >= mp->m_dalign &&
4660 !(flags & XFS_BMAPI_METADATA) && whichfork == XFS_DATA_FORK) { 4660 !(flags & XFS_BMAPI_METADATA) && whichfork == XFS_DATA_FORK) {
4661 error = xfs_bmap_isaeof(bma->ip, aoff, whichfork, &bma->aeof); 4661 error = xfs_bmap_isaeof(bma, whichfork);
4662 if (error) 4662 if (error)
4663 return error; 4663 return error;
4664 } 4664 }