add LFS_SYNC, so that "synchronous" operations don't cause deadlock
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 7.74
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_inode.c 7.73 (Berkeley) %G%
+ * @(#)lfs_inode.c 7.74 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
ip->i_flag &= ~(IUPD|IACC|ICHG|IMOD);
/* Push back the vnode and any dirty blocks it may have. */
ip->i_flag &= ~(IUPD|IACC|ICHG|IMOD);
/* Push back the vnode and any dirty blocks it may have. */
- return (ap->a_waitfor ? lfs_vflush(vp) : 0);
+ return (ap->a_waitfor & LFS_SYNC ? lfs_vflush(vp) : 0);
}
/* Update segment usage information when removing a block. */
}
/* Update segment usage information when removing a block. */
bzero((char *)&ip->i_shortlink, (u_int)ip->i_size);
ip->i_size = 0;
ip->i_flag |= ICHG|IUPD;
bzero((char *)&ip->i_shortlink, (u_int)ip->i_size);
ip->i_size = 0;
ip->i_flag |= ICHG|IUPD;
- return (VOP_UPDATE(vp, &tv, &tv, 1));
+ return (VOP_UPDATE(vp, &tv, &tv, 0));
}
vnode_pager_setsize(vp, (u_long)length);
}
vnode_pager_setsize(vp, (u_long)length);
/* If length is larger than the file, just update the times. */
if (ip->i_size <= length) {
ip->i_flag |= ICHG|IUPD;
/* If length is larger than the file, just update the times. */
if (ip->i_size <= length) {
ip->i_flag |= ICHG|IUPD;
- return (VOP_UPDATE(vp, &tv, &tv, 1));
+ return (VOP_UPDATE(vp, &tv, &tv, 0));