Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs ffs_snapshot(): return an error if the node is a...
details: https://anonhg.NetBSD.org/src/rev/c8281aeb98cd
branches: trunk
changeset: 764443:c8281aeb98cd
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Apr 23 08:23:52 2011 +0000
description:
ffs_snapshot(): return an error if the node is an invalid snapshot.
diffstat:
sys/ufs/ffs/ffs_snapshot.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r c38d551e7a34 -r c8281aeb98cd sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c Sat Apr 23 07:36:02 2011 +0000
+++ b/sys/ufs/ffs/ffs_snapshot.c Sat Apr 23 08:23:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_snapshot.c,v 1.112 2011/04/18 07:36:13 hannken Exp $ */
+/* $NetBSD: ffs_snapshot.c,v 1.113 2011/04/23 08:23:52 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.112 2011/04/18 07:36:13 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.113 2011/04/23 08:23:52 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -197,7 +197,9 @@
/*
* If the vnode already is a snapshot, return.
*/
- if ((VTOI(vp)->i_flags & (SF_SNAPSHOT | SF_SNAPINVAL)) == SF_SNAPSHOT) {
+ if ((VTOI(vp)->i_flags & SF_SNAPSHOT)) {
+ if ((VTOI(vp)->i_flags & SF_SNAPINVAL))
+ return EINVAL;
if (ctime) {
ctime->tv_sec = DIP(VTOI(vp), mtime);
ctime->tv_nsec = DIP(VTOI(vp), mtimensec);
Home |
Main Index |
Thread Index |
Old Index