vfs_vnops.c (68885) | vfs_vnops.c (71576) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/sys/kern/vfs_vnops.c 68885 2000-11-18 23:06:26Z dillon $ | 39 * $FreeBSD: head/sys/kern/vfs_vnops.c 71576 2001-01-24 12:35:55Z jasone $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 780 unchanged lines hidden (view full) --- 828 /* 829 * XXX 830 * this is a hack simply to cause the filter attach to fail 831 * for non-ufs filesystems, until the support for them is done. 832 */ 833 if ((vp)->v_tag != VT_UFS) 834 return (EOPNOTSUPP); 835 | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 780 unchanged lines hidden (view full) --- 828 /* 829 * XXX 830 * this is a hack simply to cause the filter attach to fail 831 * for non-ufs filesystems, until the support for them is done. 832 */ 833 if ((vp)->v_tag != VT_UFS) 834 return (EOPNOTSUPP); 835 |
836 simple_lock(&vp->v_pollinfo.vpi_lock); | 836 mtx_enter(&vp->v_pollinfo.vpi_lock, MTX_DEF); |
837 SLIST_INSERT_HEAD(&vp->v_pollinfo.vpi_selinfo.si_note, kn, kn_selnext); | 837 SLIST_INSERT_HEAD(&vp->v_pollinfo.vpi_selinfo.si_note, kn, kn_selnext); |
838 simple_unlock(&vp->v_pollinfo.vpi_lock); | 838 mtx_exit(&vp->v_pollinfo.vpi_lock, MTX_DEF); |
839 840 return (0); 841} 842 843static void 844filt_vndetach(struct knote *kn) 845{ 846 struct vnode *vp = (struct vnode *)kn->kn_fp->f_data; 847 | 839 840 return (0); 841} 842 843static void 844filt_vndetach(struct knote *kn) 845{ 846 struct vnode *vp = (struct vnode *)kn->kn_fp->f_data; 847 |
848 simple_lock(&vp->v_pollinfo.vpi_lock); | 848 mtx_enter(&vp->v_pollinfo.vpi_lock, MTX_DEF); |
849 SLIST_REMOVE(&vp->v_pollinfo.vpi_selinfo.si_note, 850 kn, knote, kn_selnext); | 849 SLIST_REMOVE(&vp->v_pollinfo.vpi_selinfo.si_note, 850 kn, knote, kn_selnext); |
851 simple_unlock(&vp->v_pollinfo.vpi_lock); | 851 mtx_exit(&vp->v_pollinfo.vpi_lock, MTX_DEF); |
852} 853 854static int 855filt_vnode(struct knote *kn, long hint) 856{ 857 858 if (kn->kn_sfflags & hint) 859 kn->kn_fflags |= hint; --- 122 unchanged lines hidden --- | 852} 853 854static int 855filt_vnode(struct knote *kn, long hint) 856{ 857 858 if (kn->kn_sfflags & hint) 859 kn->kn_fflags |= hint; --- 122 unchanged lines hidden --- |