vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 3/17/07, tbert <bret.lambert@gmail.com> wrote: > +int > +sosendfile(struct socket *so, struct vnode *vp, size_t nbytes, off_t *sbytes, > + struct proc *p, off_t off, int flags) this function should not be called sendfile. > + if ((vn_lock(vp, (LK_EXCLUSIVE | LK_RETRY), p) != 0) || > + (VOP_GETATTR(vp, &va, p->p_ucred, p) != 0)) { > + error = EIO; > + goto release; > + } if you fail to get the lock, you will still try to unlock it. |