static int do_pri_dentry(aufs_bindex_t bindex, struct dentry *dentry) { struct dentry *wh = NULL; int hn; if (!dentry || IS_ERR(dentry)) { dpri("d%d: err %ld\n", bindex, PTR_ERR(dentry)); return -1; } /* do not call dget_parent() here */ /* note: access d_xxx without d_lock */ dpri("d%d: %.*s?/%.*s, %s, cnt %d, flags 0x%x\n", bindex, AuDLNPair(dentry->d_parent), AuDLNPair(dentry), dentry->d_sb ? au_sbtype(dentry->d_sb) : "??", d_count(dentry), dentry->d_flags); hn = -1; if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) { struct au_iinfo *iinfo = au_ii(dentry->d_inode); if (iinfo) { hn = !!au_hn(iinfo->ii_hinode + bindex); wh = iinfo->ii_hinode[0 + bindex].hi_whdentry; } } do_pri_inode(bindex, dentry->d_inode, hn, wh); return 0; }
void au_dpri_inode(struct inode *inode) { struct au_iinfo *iinfo; aufs_bindex_t bindex; int err; err = do_pri_inode(-1, inode, NULL); if (err || !au_test_aufs(inode->i_sb)) return; iinfo = au_ii(inode); if (!iinfo) return; dpri("i-1: bstart %d, bend %d, gen %d\n", iinfo->ii_bstart, iinfo->ii_bend, au_iigen(inode)); if (iinfo->ii_bstart < 0) return; for (bindex = iinfo->ii_bstart; bindex <= iinfo->ii_bend; bindex++) do_pri_inode(bindex, iinfo->ii_hinode[0 + bindex].hi_inode, iinfo->ii_hinode[0 + bindex].hi_whdentry); }
static int do_pri_dentry(aufs_bindex_t bindex, struct dentry *dentry) { struct dentry *wh = NULL; if (!dentry || IS_ERR(dentry)) { dpri("d%d: err %ld\n", bindex, PTR_ERR(dentry)); return -1; } /* do not call dget_parent() here */ dpri("d%d: %.*s?/%.*s, %s, cnt %d, flags 0x%x\n", bindex, AuDLNPair(dentry->d_parent), AuDLNPair(dentry), dentry->d_sb ? au_sbtype(dentry->d_sb) : "??", atomic_read(&dentry->d_count), dentry->d_flags); if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) { struct au_iinfo *iinfo = au_ii(dentry->d_inode); if (iinfo) wh = iinfo->ii_hinode[0 + bindex].hi_whdentry; } do_pri_inode(bindex, dentry->d_inode, wh); return 0; }