- /* Could be a deadlock ? */
- if (VFS_VGET(mntp, blkp->bi_inode, &vp))
+ /*
+ * A regular call to VFS_VGET could deadlock
+ * here. Instead, we try an unlocked access.
+ */
+ ump = VFSTOUFS(mntp);
+ if ((vp =
+ ufs_ihashlookup(ump->um_dev, blkp->bi_inode)) != NULL) {
+ if (VOP_BMAP(vp, blkp->bi_lbn, NULL, &daddr, NULL))
+ daddr = LFS_UNUSED_DADDR;
+ } else if (VFS_VGET(mntp, blkp->bi_inode, &vp))