vfs_subr.c (197030) | vfs_subr.c (197134) |
---|---|
1/*- 2 * Copyright (c) 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. --- 25 unchanged lines hidden (view full) --- 34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 35 */ 36 37/* 38 * External virtual filesystem routines 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 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. --- 25 unchanged lines hidden (view full) --- 34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 35 */ 36 37/* 38 * External virtual filesystem routines 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/kern/vfs_subr.c 197030 2009-09-09 10:51:50Z kib $"); | 42__FBSDID("$FreeBSD: head/sys/kern/vfs_subr.c 197134 2009-09-12 20:03:45Z rwatson $"); |
43 44#include "opt_ddb.h" 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/bio.h> 49#include <sys/buf.h> 50#include <sys/condvar.h> --- 3946 unchanged lines hidden (view full) --- 3997 3998 KNOTE_UNLOCKED(&fs_knlist, event); 3999} 4000 4001static int filt_fsattach(struct knote *kn); 4002static void filt_fsdetach(struct knote *kn); 4003static int filt_fsevent(struct knote *kn, long hint); 4004 | 43 44#include "opt_ddb.h" 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/bio.h> 49#include <sys/buf.h> 50#include <sys/condvar.h> --- 3946 unchanged lines hidden (view full) --- 3997 3998 KNOTE_UNLOCKED(&fs_knlist, event); 3999} 4000 4001static int filt_fsattach(struct knote *kn); 4002static void filt_fsdetach(struct knote *kn); 4003static int filt_fsevent(struct knote *kn, long hint); 4004 |
4005struct filterops fs_filtops = 4006 { 0, filt_fsattach, filt_fsdetach, filt_fsevent }; | 4005struct filterops fs_filtops = { 4006 .f_isfd = 0, 4007 .f_attach = filt_fsattach, 4008 .f_detach = filt_fsdetach, 4009 .f_event = filt_fsevent 4010}; |
4007 4008static int 4009filt_fsattach(struct knote *kn) 4010{ 4011 4012 kn->kn_flags |= EV_CLEAR; 4013 knlist_add(&fs_knlist, kn, 0); 4014 return (0); --- 56 unchanged lines hidden (view full) --- 4071 getbinuptime(&bt); 4072 return (((u_quad_t)bt.sec << 32LL) | (bt.frac >> 32LL)); 4073} 4074 4075static int filt_vfsread(struct knote *kn, long hint); 4076static int filt_vfswrite(struct knote *kn, long hint); 4077static int filt_vfsvnode(struct knote *kn, long hint); 4078static void filt_vfsdetach(struct knote *kn); | 4011 4012static int 4013filt_fsattach(struct knote *kn) 4014{ 4015 4016 kn->kn_flags |= EV_CLEAR; 4017 knlist_add(&fs_knlist, kn, 0); 4018 return (0); --- 56 unchanged lines hidden (view full) --- 4075 getbinuptime(&bt); 4076 return (((u_quad_t)bt.sec << 32LL) | (bt.frac >> 32LL)); 4077} 4078 4079static int filt_vfsread(struct knote *kn, long hint); 4080static int filt_vfswrite(struct knote *kn, long hint); 4081static int filt_vfsvnode(struct knote *kn, long hint); 4082static void filt_vfsdetach(struct knote *kn); |
4079static struct filterops vfsread_filtops = 4080 { 1, NULL, filt_vfsdetach, filt_vfsread }; 4081static struct filterops vfswrite_filtops = 4082 { 1, NULL, filt_vfsdetach, filt_vfswrite }; 4083static struct filterops vfsvnode_filtops = 4084 { 1, NULL, filt_vfsdetach, filt_vfsvnode }; | 4083static struct filterops vfsread_filtops = { 4084 .f_isfd = 1, 4085 .f_detach = filt_vfsdetach, 4086 .f_event = filt_vfsread 4087}; 4088static struct filterops vfswrite_filtops = { 4089 .f_isfd = 1, 4090 .f_detach = filt_vfsdetach, 4091 .f_event = filt_vfswrite 4092}; 4093static struct filterops vfsvnode_filtops = { 4094 .f_isfd = 1, 4095 .f_detach = filt_vfsdetach, 4096 .f_event = filt_vfsvnode 4097}; |
4085 4086static void 4087vfs_knllock(void *arg) 4088{ 4089 struct vnode *vp = arg; 4090 4091 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); 4092} --- 234 unchanged lines hidden --- | 4098 4099static void 4100vfs_knllock(void *arg) 4101{ 4102 struct vnode *vp = arg; 4103 4104 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); 4105} --- 234 unchanged lines hidden --- |