Module Name: src Committed By: pooka Date: Thu May 27 13:22:03 UTC 2010
Modified Files: src/sys/fs/sysvbfs: sysvbfs_vnops.c Log Message: Release pathname buffers after use. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/fs/sysvbfs/sysvbfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/sysvbfs/sysvbfs_vnops.c diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.28 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.29 --- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.28 Wed May 26 21:27:00 2010 +++ src/sys/fs/sysvbfs/sysvbfs_vnops.c Thu May 27 13:22:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysvbfs_vnops.c,v 1.28 2010/05/26 21:27:00 pooka Exp $ */ +/* $NetBSD: sysvbfs_vnops.c,v 1.29 2010/05/27 13:22:02 pooka Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.28 2010/05/26 21:27:00 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.29 2010/05/27 13:22:02 pooka Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -168,6 +168,9 @@ /* unlock parent directory */ vput(a->a_dvp); /* locked at sysvbfs_lookup(); */ + if (err || (a->a_cnp->cn_flags & SAVESTART) == 0) + PNBUF_PUT(a->a_cnp->cn_pnbuf); + return err; } @@ -478,6 +481,9 @@ vput(vp); vput(dvp); + if (err || (ap->a_cnp->cn_flags & SAVESTART) == 0) + PNBUF_PUT(ap->a_cnp->cn_pnbuf); + return err; }