Module Name: src Committed By: manu Date: Wed Jun 29 08:01:14 UTC 2011
Modified Files: src/sys/kern: vfs_xattr.c Log Message: Fix bug introduced in previous commuit: Do not vrele() a vnode we did not obtained. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/kern/vfs_xattr.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/kern/vfs_xattr.c diff -u src/sys/kern/vfs_xattr.c:1.25 src/sys/kern/vfs_xattr.c:1.26 --- src/sys/kern/vfs_xattr.c:1.25 Tue Jun 28 07:50:03 2011 +++ src/sys/kern/vfs_xattr.c Wed Jun 29 08:01:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_xattr.c,v 1.25 2011/06/28 07:50:03 manu Exp $ */ +/* $NetBSD: vfs_xattr.c,v 1.26 2011/06/29 08:01:14 manu Exp $ */ /*- * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_xattr.c,v 1.25 2011/06/28 07:50:03 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_xattr.c,v 1.26 2011/06/29 08:01:14 manu Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -794,7 +794,7 @@ error = namei_simple_user(SCARG(uap, path), NSM_FOLLOW_NOEMULROOT, &vp); if (error) - goto out_rele; + goto out; namespace = xattr_native(attrname); @@ -802,7 +802,6 @@ attrname, SCARG(uap, value), SCARG(uap, size), l, &attrlen, SCARG(uap, flags)); -out_rele: vrele(vp); out: *retval = (error == 0) ? 0 : -1; @@ -833,7 +832,7 @@ error = namei_simple_user(SCARG(uap, path), NSM_NOFOLLOW_NOEMULROOT, &vp); if (error) - goto out_rele; + goto out; namespace = xattr_native(attrname); @@ -841,7 +840,6 @@ attrname, SCARG(uap, value), SCARG(uap, size), l, &attrlen, SCARG(uap, flags)); -out_rele: vrele(vp); out: *retval = (error == 0) ? 0 : -1;