From 5d0a6a48b58de3ac3d14cd933f6a0ddab7cf6a94 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 2 Nov 2005 15:00:01 +1100 Subject: [PATCH] --- yaml --- r: 12203 b: refs/heads/master c: 0116d9356bfa8607a6e2efb5263100a6c72eabb0 h: refs/heads/master i: 12201: 0fe903550e99c4030adb9ff245f1b95967a64b79 12199: cf9f5a04fb0fa17a705d648eec571160728f06b3 v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_iomap.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 3ad4f3cd0842..bc9943b7ace6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4ce3121f67d482324825e7f17c9f7d8568a9fe24 +refs/heads/master: 0116d9356bfa8607a6e2efb5263100a6c72eabb0 diff --git a/trunk/fs/xfs/xfs_iomap.c b/trunk/fs/xfs/xfs_iomap.c index 113c647a9f6f..4bdd796e7ae9 100644 --- a/trunk/fs/xfs/xfs_iomap.c +++ b/trunk/fs/xfs/xfs_iomap.c @@ -366,13 +366,13 @@ xfs_iomap_write_direct( xfs_filblks_t count_fsb; xfs_fsize_t isize; xfs_fsblock_t firstfsb; - int nimaps, maps; + int nimaps; int error; int bmapi_flag; int quota_flag; int rt; xfs_trans_t *tp; - xfs_bmbt_irec_t imap[XFS_WRITE_IMAPS], *imapp; + xfs_bmbt_irec_t imap; xfs_bmap_free_t free_list; int aeof; xfs_filblks_t qblocks, resblks; @@ -387,9 +387,6 @@ xfs_iomap_write_direct( if (error) return XFS_ERROR(error); - maps = min(XFS_WRITE_IMAPS, *nmaps); - nimaps = maps; - isize = ip->i_d.di_size; aeof = (offset + count) > isize; @@ -464,9 +461,8 @@ xfs_iomap_write_direct( */ XFS_BMAP_INIT(&free_list, &firstfsb); nimaps = 1; - imapp = &imap[0]; error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, - bmapi_flag, &firstfsb, 0, imapp, &nimaps, &free_list); + bmapi_flag, &firstfsb, 0, &imap, &nimaps, &free_list); if (error) goto error0; @@ -488,7 +484,7 @@ xfs_iomap_write_direct( goto error_out; } - *ret_imap = imap[0]; + *ret_imap = imap; *nmaps = 1; if ( !(io->io_flags & XFS_IOCORE_RT) && !ret_imap->br_startblock) { cmn_err(CE_PANIC,"Access to block zero: fs <%s> inode: %lld "