Print this page
3484 enhance and document tail follow support
Reviewed by: Joshua M. Clulow <jmc@joyent.com>

*** 29,38 **** --- 29,42 ---- /* * Copyright 1983,1984,1985,1986,1987,1988,1989 AT&T. * All Rights Reserved */ + /* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ + #include <sys/param.h> #include <sys/types.h> #include <sys/systm.h> #include <sys/cred.h> #include <sys/time.h>
*** 6651,6670 **** if (error) { VN_RELE(vp); } else { vnode_t *tvp; rnode4_t *trp; - /* - * existing file got truncated, notify. - */ tvp = vp; if (vp->v_type == VREG) { trp = VTOR4(vp); if (IS_SHADOW(vp, trp)) tvp = RTOV4(trp); } vnevent_create(tvp, ct); *vpp = vp; } return (error); create_otw: --- 6655,6678 ---- if (error) { VN_RELE(vp); } else { vnode_t *tvp; rnode4_t *trp; tvp = vp; if (vp->v_type == VREG) { trp = VTOR4(vp); if (IS_SHADOW(vp, trp)) tvp = RTOV4(trp); } + + if (must_trunc) { + /* + * existing file got truncated, notify. + */ vnevent_create(tvp, ct); + } + *vpp = vp; } return (error); create_otw: