Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs Add fstrans transactions to ufs_close(), ufs_get...
details: https://anonhg.NetBSD.org/src/rev/573ce52c4bc8
branches: trunk
changeset: 753886:573ce52c4bc8
user: hannken <hannken%NetBSD.org@localhost>
date: Tue Apr 13 09:27:58 2010 +0000
description:
Add fstrans transactions to ufs_close(), ufs_getattr(), ufs_chmod()
and ufs_chown(). These functions change file system state.
diffstat:
sys/ufs/ufs/ufs_vnops.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (81 lines):
diff -r 26f64369f46a -r 573ce52c4bc8 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c Tue Apr 13 09:24:09 2010 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c Tue Apr 13 09:27:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vnops.c,v 1.181 2010/03/29 13:11:34 pooka Exp $ */
+/* $NetBSD: ufs_vnops.c,v 1.182 2010/04/13 09:27:58 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.181 2010/03/29 13:11:34 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.182 2010/04/13 09:27:58 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -267,8 +267,10 @@
vp = ap->a_vp;
ip = VTOI(vp);
+ fstrans_start(vp->v_mount, FSTRANS_SHARED);
if (vp->v_usecount > 1)
UFS_ITIMES(vp, NULL, NULL, NULL);
+ fstrans_done(vp->v_mount);
return (0);
}
@@ -371,6 +373,7 @@
vp = ap->a_vp;
ip = VTOI(vp);
vap = ap->a_vap;
+ fstrans_start(vp->v_mount, FSTRANS_SHARED);
UFS_ITIMES(vp, NULL, NULL, NULL);
/*
@@ -420,6 +423,7 @@
vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize;
vap->va_type = vp->v_type;
vap->va_filerev = ip->i_modrev;
+ fstrans_done(vp->v_mount);
return (0);
}
@@ -671,11 +675,13 @@
if (error)
return (error);
+ fstrans_start(vp->v_mount, FSTRANS_SHARED);
ip->i_mode &= ~ALLPERMS;
ip->i_mode |= (mode & ALLPERMS);
ip->i_flag |= IN_CHANGE;
DIP_ASSIGN(ip, mode, ip->i_mode);
UFS_WAPBL_UPDATE(vp, NULL, NULL, 0);
+ fstrans_done(vp->v_mount);
return (0);
}
@@ -706,6 +712,7 @@
if (error)
return (error);
+ fstrans_start(vp->v_mount, FSTRANS_SHARED);
#ifdef QUOTA
ogid = ip->i_gid;
ouid = ip->i_uid;
@@ -730,11 +737,13 @@
DIP_ASSIGN(ip, uid, ouid);
(void) chkdq(ip, change, cred, FORCE);
(void) chkiq(ip, 1, cred, FORCE);
+ fstrans_done(vp->v_mount);
return (error);
good:
#endif /* QUOTA */
ip->i_flag |= IN_CHANGE;
UFS_WAPBL_UPDATE(vp, NULL, NULL, 0);
+ fstrans_done(vp->v_mount);
return (0);
}
Home |
Main Index |
Thread Index |
Old Index