Lines Matching refs:dp

601 	struct ud_inode *dp,
620 ASSERT(RW_WRITE_HELD(&dp->i_rwlock));
622 udf_vfsp = dp->i_udf;
640 ASSERT(RW_WRITE_HELD(&dp->i_rwlock));
645 if (dp->i_type != VDIR) {
661 if (err = ud_iaccess(dp, IEXEC|IWRITE, cr, 1)) {
667 rw_enter(&dp->i_contents, RW_WRITER);
669 if (err = ud_dircheckforname(dp, namep, namelen, &slot, &ip,
704 if (err = ud_sticky_remove_access(dp, ip, cr)) {
720 if (dp == ip || ITOV(ip) == cdir) {
725 (!ud_dirempty(ip, dp->i_uniqid, cr))) {
760 dnlc_remove(ITOV(dp), namep);
777 if ((slot.offset + FID_LEN(fid)) == dp->i_size) {
779 if ((err = ud_itrunc(dp, slot.offset, 0, cr)) != 0) {
785 if ((err = ud_ip_off2bno(dp, slot.offset, &tbno)) != 0) {
789 ud_make_tag(dp->i_udf, &fid->fid_tag,
792 err = ud_write_fid(dp, &slot, buf);
805 mutex_enter(&dp->i_tlock);
806 dp->i_flag |= IUPD|ICHG;
807 mutex_exit(&dp->i_tlock);
827 * Decrement the dp linkcount because we're
831 dp->i_nlink--;
841 ITIMES_NOLOCK(dp);
849 ASSERT(RW_WRITE_HELD(&dp->i_contents));
854 rw_exit(&dp->i_contents);
863 vnevent_remove(ITOV(ip), ITOV(dp), namep, ctp);
865 vnevent_rmdir(ITOV(ip), ITOV(dp), namep, ctp);
1340 * Write a prototype directory into the empty inode ip, whose parent is dp.
1345 struct ud_inode *dp, struct cred *cr)
1356 ASSERT(RW_WRITE_HELD(&dp->i_rwlock));
1391 * Update the dp link count and write out the change.
1394 if (dp->i_nlink == MAXLINK) {
1397 dp->i_nlink++;
1398 dp->i_flag |= ICHG;
1399 ud_iupdat(dp, 1);
1419 fid->fid_icb.lad_ext_len = SWAP_32(dp->i_udf->udf_lbsize);
1420 fid->fid_icb.lad_ext_loc = SWAP_32(dp->i_icb_block);
1421 fid->fid_icb.lad_ext_prn = SWAP_16(dp->i_icb_prn);
1556 * Fix the ".." entry in sip to point to dp.
1625 ud_dirprepareentry(struct ud_inode *dp,
1635 ASSERT(RW_WRITE_HELD(&dp->i_rwlock));
1640 lbsize = dp->i_udf->udf_lbsize;
1641 lbmask = dp->i_udf->udf_lbmask;
1665 old_dtype = dp->i_desc_type;
1666 old_size = (uint32_t)dp->i_size;
1667 error = ud_bmap_write(dp, slotp->offset,
1668 blkoff(dp->i_udf, slotp->offset) + entrysize,
1673 if (old_dtype != dp->i_desc_type) {
1681 if ((error = ud_ip_off2bno(dp,
1685 if ((error = fbread(ITOV(dp), 0,
1686 dp->i_udf->udf_lbsize,
1697 ud_make_tag(dp->i_udf, &tfid->fid_tag,
1703 if (error = ud_fbwrite(fbp, dp)) {
1709 if (dp->i_desc_type != ICB_FLAG_ONE_AD) {
1710 ASSERT(dp->i_ext);
1711 dp->i_ext[dp->i_ext_used - 1].ib_count +=
1715 dp->i_size += entrysize;
1716 dp->i_flag |= IUPD|ICHG|IATTCHG;
1717 ITIMES_NOLOCK(dp);
1723 if ((error = ud_ip_off2bno(dp, slotp->offset, &tbno)) != 0) {
1726 ud_make_tag(dp->i_udf, &fid->fid_tag, UD_FILE_ID_DESC,
1734 if ((error = fbread(ITOV(dp), offset & mask, lbsize,
1745 if (error = ud_fbwrite(fbp, dp)) {
1750 if ((error = fbread(ITOV(dp), (offset + entrysize) & mask,
1755 if (error = ud_fbwrite(fbp, dp)) {
1760 dp->i_flag |= IUPD|ICHG|IATTCHG;
1761 ITIMES_NOLOCK(dp);
1769 * assumes that dp is a directory and that all the inodes are on
1773 ud_dirfixdotdot(struct ud_inode *dp,
1788 err = fbread(ITOV(dp), (offset_t)0,
1789 dp->i_udf->udf_lbsize, S_WRITE, &fbp);
1791 if (err || dp->i_nlink == 0 ||
1792 dp->i_size < sizeof (struct file_id)) {
1796 if ((err = ud_ip_off2bno(dp, 0, &tbno)) != 0) {
1803 1, dp->i_udf->udf_lbsize) != 0) ||
1810 loc = ud_xlate_to_daddr(dp->i_udf,
1835 dnlc_remove(ITOV(dp), "..");
1840 dnlc_enter(ITOV(dp), "..", ITOV(npdp));
1842 err = ud_fbwrite(fbp, dp);
1874 ud_write_fid(struct ud_inode *dp, struct slot *slot, uint8_t *buf)
1886 udf_vfsp = dp->i_udf;
1888 lbsize = dp->i_udf->udf_lbsize;
1889 lbmask = dp->i_udf->udf_lbmask;
1894 if ((error = fbread(ITOV(dp),
1926 error = ud_fbwrite(lfbp, dp);
1928 error = ud_fbwrite(slot->fbp, dp);
1934 error = ud_fbwrite(lfbp, dp);
1939 if ((error = ud_fbwrite(slot->fbp, dp)) != 0) {
1941 ud_make_tag(dp->i_udf, &fid->fid_tag, UD_FILE_ID_DESC,