args->len);
 #endif
 
-               /* Zero the extent if we were asked to do so */
-               if (args->datatype & XFS_ALLOC_USERDATA_ZERO) {
-                       error = xfs_zero_extent(args->ip, args->fsbno, args->len);
-                       if (error)
-                               goto error0;
-               }
-
        }
        xfs_perag_put(args->pag);
        return 0;
 
        struct xfs_mount *mp;           /* file system mount point */
        struct xfs_buf  *agbp;          /* buffer for a.g. freelist header */
        struct xfs_perag *pag;          /* per-ag struct for this agno */
-       struct xfs_inode *ip;           /* for userdata zeroing method */
        xfs_fsblock_t   fsbno;          /* file system block number */
        xfs_agnumber_t  agno;           /* allocation group number */
        xfs_agblock_t   agbno;          /* allocation group-relative block # */
  */
 #define XFS_ALLOC_USERDATA             (1 << 0)/* allocation is for user data*/
 #define XFS_ALLOC_INITIAL_USER_DATA    (1 << 1)/* special case start of file */
-#define XFS_ALLOC_USERDATA_ZERO                (1 << 2)/* zero extent on allocation */
-#define XFS_ALLOC_NOBUSY               (1 << 3)/* Busy extents not allowed */
+#define XFS_ALLOC_NOBUSY               (1 << 2)/* Busy extents not allowed */
 
 static inline bool
 xfs_alloc_is_userdata(int datatype)
 
        args.wasdel = ap->wasdel;
        args.resv = XFS_AG_RESV_NONE;
        args.datatype = ap->datatype;
-       if (ap->datatype & XFS_ALLOC_USERDATA_ZERO)
-               args.ip = ap->ip;
 
        error = xfs_alloc_vextent(&args);
        if (error)
         * the busy list.
         */
        bma->datatype = XFS_ALLOC_NOBUSY;
-       if (bma->flags & XFS_BMAPI_ZERO)
-               bma->datatype |= XFS_ALLOC_USERDATA_ZERO;
        if (whichfork == XFS_DATA_FORK) {
                if (bma->offset == 0)
                        bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA;
        if (error || bma->blkno == NULLFSBLOCK)
                return error;
 
+       if (bma->flags & XFS_BMAPI_ZERO) {
+               error = xfs_zero_extent(bma->ip, bma->blkno, bma->length);
+               if (error)
+                       return error;
+       }
+
        if ((ifp->if_flags & XFS_IFBROOT) && !bma->cur)
                bma->cur = xfs_bmbt_init_cursor(mp, bma->tp, bma->ip, whichfork);
        /*
 
                xfs_trans_mod_dquot_byino(ap->tp, ap->ip,
                        ap->wasdel ? XFS_TRANS_DQ_DELRTBCOUNT :
                                        XFS_TRANS_DQ_RTBCOUNT, (long) ralen);
-
-               /* Zero the extent if we were asked to do so */
-               if (ap->datatype & XFS_ALLOC_USERDATA_ZERO) {
-                       error = xfs_zero_extent(ap->ip, ap->blkno, ap->length);
-                       if (error)
-                               return error;
-               }
        } else {
                ap->length = 0;
        }