/*
- * Copyright (c) 2003-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2014 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
entryp->aiocb.aio_offset,
flags,
&entryp->returnval);
-
- fp_drop(entryp->procp, entryp->aiocb.aio_fildes, fp, 0);
+
+ if (entryp->returnval)
+ fp_drop_written(entryp->procp, entryp->aiocb.aio_fildes, fp);
+ else
+ fp_drop(entryp->procp, entryp->aiocb.aio_fildes, fp, 0);
return( error );