(void) hfs_lock(cp, HFS_FORCE_LOCK);
- /*
- * Recycle named streams quickly so that the data fork vnode can
- * go inactive in a timely manner (so that it can be zero filled
- * or truncated if needed).
- */
- if (vnode_isnamedstream(vp))
- recycle = 1;
-
/*
* We should lock cnode before checking the flags in the
* condition below and should unlock the cnode before calling
*/
if ((cp->c_flag & C_MODIFIED) ||
cp->c_touch_acctime || cp->c_touch_chgtime || cp->c_touch_modtime) {
- cp->c_flag |= C_FORCEUPDATE;
+ if ((cp->c_flag & C_MODIFIED) || cp->c_touch_modtime){
+ cp->c_flag |= C_FORCEUPDATE;
+ }
hfs_update(vp, 0);
}
out:
* force the update, or hfs_update will again skip the cat_update.
*/
if ((cp->c_flag & C_MODIFIED) ||
- cp->c_touch_acctime || cp->c_touch_chgtime || cp->c_touch_modtime) {
- cp->c_flag |= C_FORCEUPDATE;
+ cp->c_touch_acctime || cp->c_touch_chgtime || cp->c_touch_modtime) {
+ if ((cp->c_flag & C_MODIFIED) || cp->c_touch_modtime){
+ cp->c_flag |= C_FORCEUPDATE;
+ }
hfs_update(vp, 0);
}
* occurred during the attachment, then cleanup the cnode.
*/
if ((cp->c_vp == NULL) && (cp->c_rsrc_vp == NULL)) {
- hfs_chash_abort(cp);
+ hfs_chash_abort(cp);
hfs_reclaim_cnode(cp);
- } else {
- hfs_chashwakeup(cp, H_ALLOC | H_ATTACH);
- hfs_unlock(cp);
+ }
+ else {
+ hfs_chashwakeup(cp, H_ALLOC | H_ATTACH);
+ if ((flags & GNV_SKIPLOCK) == 0){
+ hfs_unlock(cp);
+ }
}
*vpp = NULL;
return (retval);