]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/ufs/ffs/ffs_inode.c
xnu-517.tar.gz
[apple/xnu.git] / bsd / ufs / ffs / ffs_inode.c
index 0ffc112e234b1618a333d238510df76c1b56f686..88d47d5eb0eeac2ec9157950829d4296534cc58c 100644 (file)
@@ -537,9 +537,14 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
          (u_int)(NINDIR(fs) - (last + 1)) * sizeof (ufs_daddr_t));
        if (last == -1)
                bp->b_flags |= B_INVAL;
-       error = bwrite(bp);
-       if (error)
-               allerror = error;
+       if (last != -1 && (vp)->v_mount->mnt_flag & MNT_ASYNC) {
+               error = 0;
+               bdwrite(bp);
+       } else {
+               error = bwrite(bp);
+               if (error)
+                       allerror = error;
+       }
        bap = copy;
 
        /*