Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs Use softdep_change_linkcnt to note that the inod...



details:   https://anonhg.NetBSD.org/src/rev/713e2c922d3b
branches:  trunk
changeset: 519787:713e2c922d3b
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Dec 27 01:48:38 2001 +0000

description:
Use softdep_change_linkcnt to note that the inode mode was set to 0.
>From FreeBSD.

diffstat:

 sys/ufs/ufs/ufs_inode.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 35f01f3a78f0 -r 713e2c922d3b sys/ufs/ufs/ufs_inode.c
--- a/sys/ufs/ufs/ufs_inode.c   Thu Dec 27 01:44:59 2001 +0000
+++ b/sys/ufs/ufs/ufs_inode.c   Thu Dec 27 01:48:38 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_inode.c,v 1.31 2001/12/18 10:57:23 fvdl Exp $      */
+/*     $NetBSD: ufs_inode.c,v 1.32 2001/12/27 01:48:38 fvdl Exp $      */
 
 /*
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.31 2001/12/18 10:57:23 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.32 2001/12/27 01:48:38 fvdl Exp $");
 
 #include "opt_quota.h"
 
@@ -97,10 +97,18 @@
                if (ip->i_ffs_size != 0) {
                        error = VOP_TRUNCATE(vp, (off_t)0, 0, NOCRED, p);
                }
+               /*
+                * Setting the mode to zero needs to wait for the inode
+                * to be written just as does a change to the link count.
+                * So, rather than creating a new entry point to do the
+                * same thing, we just use softdep_change_linkcnt().
+                */
                ip->i_ffs_rdev = 0;
                mode = ip->i_ffs_mode;
                ip->i_ffs_mode = 0;
                ip->i_flag |= IN_CHANGE | IN_UPDATE;
+               if (DOINGSOFTDEP(vp))
+                       softdep_change_linkcnt(ip);
                VOP_VFREE(vp, ip->i_number, mode);
        }
 



Home | Main Index | Thread Index | Old Index