Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs Testing "v_usecount == 1" for exclusive referenc...
details: https://anonhg.NetBSD.org/src/rev/8e6502df8f99
branches: trunk
changeset: 329598:8e6502df8f99
user: hannken <hannken%NetBSD.org@localhost>
date: Fri May 30 08:40:09 2014 +0000
description:
Testing "v_usecount == 1" for exclusive reference will not always
work -- remove and test only readonly.
diffstat:
sys/ufs/ffs/ffs_snapshot.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r c575e8b67c87 -r 8e6502df8f99 sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c Fri May 30 08:37:35 2014 +0000
+++ b/sys/ufs/ffs/ffs_snapshot.c Fri May 30 08:40:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_snapshot.c,v 1.134 2014/05/24 16:34:04 christos Exp $ */
+/* $NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $ */
/*
* Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.134 2014/05/24 16:34:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -423,11 +423,11 @@
struct inode *ip = VTOI(vp);
/*
- * Check mount, exclusive reference and owner.
+ * Check mount, readonly reference and owner.
*/
if (vp->v_mount != mp)
return EXDEV;
- if (vp->v_usecount != 1 || vp->v_writecount != 0)
+ if (vp->v_writecount != 0)
return EBUSY;
error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_FS_SNAPSHOT,
0, mp, vp, NULL);
Home |
Main Index |
Thread Index |
Old Index