Module Name: src Committed By: hannken Date: Fri May 30 08:40:09 UTC 2014
Modified Files: src/sys/ufs/ffs: ffs_snapshot.c Log Message: Testing "v_usecount == 1" for exclusive reference will not always work -- remove and test only readonly. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.134 src/sys/ufs/ffs/ffs_snapshot.c:1.135 --- src/sys/ufs/ffs/ffs_snapshot.c:1.134 Sat May 24 16:34:04 2014 +++ src/sys/ufs/ffs/ffs_snapshot.c Fri May 30 08:40:09 2014 @@ -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 @@ snapshot_setup(struct mount *mp, struct 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);