Print this page
*** NO COMMENTS ***

*** 122,132 **** */ /*ARGSUSED*/ void smbfs_purge_caches(struct vnode *vp) { - #if 0 /* not yet: mmap support */ /* * NFS: Purge the DNLC for this vp, * Clear any readdir state bits, * the readlink response cache, ... */ --- 122,131 ----
*** 134,146 **** /* * Flush the page cache. */ if (vn_has_cached_data(vp)) { ! (void) VOP_PUTPAGE(vp, (u_offset_t)0, 0, B_INVAL, cr, NULL); } - #endif /* not yet */ } /* * Check the attribute cache to see if the new attributes match * those cached. If they do, the various `data' caches are --- 133,144 ---- /* * Flush the page cache. */ if (vn_has_cached_data(vp)) { ! (void) VOP_PUTPAGE(vp, (u_offset_t) 0, 0, B_INVAL, np->r_cred, NULL); } } /* * Check the attribute cache to see if the new attributes match * those cached. If they do, the various `data' caches are
*** 292,308 **** newsize = fap->fa_size; if (vtype == VDIR && newsize < DEV_BSIZE) newsize = DEV_BSIZE; if (np->r_size != newsize) { ! #if 0 /* not yet: mmap support */ ! if (!vn_has_cached_data(vp) || ...) ! /* XXX: See NFS page cache code. */ ! #endif /* not yet */ /* OK to set the size. */ np->r_size = newsize; } /* NFS: np->r_flags &= ~RWRITEATTR; */ np->n_flag &= ~NATTRCHANGED; mutex_exit(&np->r_statelock); --- 290,305 ---- newsize = fap->fa_size; if (vtype == VDIR && newsize < DEV_BSIZE) newsize = DEV_BSIZE; if (np->r_size != newsize) { ! if (!vn_has_cached_data(vp) ! || (!(np->r_flags & RDIRTY)&& np->r_count == 0)) { /* OK to set the size. */ np->r_size = newsize; } + } /* NFS: np->r_flags &= ~RWRITEATTR; */ np->n_flag &= ~NATTRCHANGED; mutex_exit(&np->r_statelock);