]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_iomap.c
[PATCH] remove gcc-2 checks
[linux-2.6] / fs / xfs / xfs_iomap.c
index 113c647a9f6fd0d1110432cbf9712399522a0758..45a77a3a6c07ed60b2a4fe041c6496c5ded3e1a5 100644 (file)
@@ -364,17 +364,15 @@ xfs_iomap_write_direct(
        xfs_fileoff_t   offset_fsb;
        xfs_fileoff_t   last_fsb;
        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;
        int             committed;
        int             resrtextents;
@@ -387,15 +385,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;
-
-       if (io->io_new_size > isize)
-               isize = io->io_new_size;
-
        offset_fsb = XFS_B_TO_FSBT(mp, offset);
        last_fsb = XFS_B_TO_FSB(mp, ((xfs_ufsize_t)(offset + count)));
        count_fsb = last_fsb - offset_fsb;
@@ -464,9 +453,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 +476,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 "