Deleted Added
full compact
vfs_cache.c (206894) vfs_cache.c (209390)
1/*-
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Poul-Henning Kamp of the FreeBSD Project.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Poul-Henning Kamp of the FreeBSD Project.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 206894 2010-04-20 10:19:27Z kib $");
36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 209390 2010-06-21 09:55:56Z ed $");
37
38#include "opt_kdtrace.h"
39#include "opt_ktrace.h"
40
41#include <sys/param.h>
42#include <sys/filedesc.h>
43#include <sys/fnv_hash.h>
44#include <sys/kernel.h>

--- 329 unchanged lines hidden (view full) ---

374
375int
376cache_lookup(dvp, vpp, cnp)
377 struct vnode *dvp;
378 struct vnode **vpp;
379 struct componentname *cnp;
380{
381 struct namecache *ncp;
37
38#include "opt_kdtrace.h"
39#include "opt_ktrace.h"
40
41#include <sys/param.h>
42#include <sys/filedesc.h>
43#include <sys/fnv_hash.h>
44#include <sys/kernel.h>

--- 329 unchanged lines hidden (view full) ---

374
375int
376cache_lookup(dvp, vpp, cnp)
377 struct vnode *dvp;
378 struct vnode **vpp;
379 struct componentname *cnp;
380{
381 struct namecache *ncp;
382 u_int32_t hash;
382 uint32_t hash;
383 int error, ltype, wlocked;
384
385 if (!doingcache) {
386 cnp->cn_flags &= ~MAKEENTRY;
387 return (0);
388 }
389retry:
390 CACHE_RLOCK();

--- 206 unchanged lines hidden (view full) ---

597void
598cache_enter(dvp, vp, cnp)
599 struct vnode *dvp;
600 struct vnode *vp;
601 struct componentname *cnp;
602{
603 struct namecache *ncp, *n2;
604 struct nchashhead *ncpp;
383 int error, ltype, wlocked;
384
385 if (!doingcache) {
386 cnp->cn_flags &= ~MAKEENTRY;
387 return (0);
388 }
389retry:
390 CACHE_RLOCK();

--- 206 unchanged lines hidden (view full) ---

597void
598cache_enter(dvp, vp, cnp)
599 struct vnode *dvp;
600 struct vnode *vp;
601 struct componentname *cnp;
602{
603 struct namecache *ncp, *n2;
604 struct nchashhead *ncpp;
605 u_int32_t hash;
605 uint32_t hash;
606 int flag;
607 int hold;
608 int zap;
609 int len;
610
611 CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr);
612 VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp,
613 ("cache_enter: Adding a doomed vnode"));

--- 615 unchanged lines hidden ---
606 int flag;
607 int hold;
608 int zap;
609 int len;
610
611 CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr);
612 VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp,
613 ("cache_enter: Adding a doomed vnode"));

--- 615 unchanged lines hidden ---