Source-Changes-HG archive

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

[src/uebayasi-xip]: src/sys/ufs/ffs ffs_vget: Mark XIP only for VREG vnodes.



details:   https://anonhg.NetBSD.org/src/rev/7785df1c27cc
branches:  uebayasi-xip
changeset: 751800:7785df1c27cc
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Sun Sep 26 06:35:32 2010 +0000

description:
ffs_vget: Mark XIP only for VREG vnodes.

diffstat:

 sys/ufs/ffs/ffs_vfsops.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r bbd0d153753f -r 7785df1c27cc sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c  Sat Sep 11 13:06:38 2010 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c  Sun Sep 26 06:35:32 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_vfsops.c,v 1.257.2.8 2010/08/17 06:48:10 uebayasi Exp $    */
+/*     $NetBSD: ffs_vfsops.c,v 1.257.2.9 2010/09/26 06:35:32 uebayasi Exp $    */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.257.2.8 2010/08/17 06:48:10 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.257.2.9 2010/09/26 06:35:32 uebayasi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1771,12 +1771,6 @@
 
        vp->v_vflag |= VV_LOCKSWORK;
 
-#ifdef XIP
-       if ((vp->v_mount->mnt_iflag & IMNT_XIP) != 0) {
-               vp->v_vflag |= VV_XIP;
-       }
-#endif
-
        /*
         * XXX MFS ends up here, too, to allocate an inode.  Should we
         * XXX create another pool for MFS inodes?
@@ -1842,6 +1836,13 @@
 
        ufs_vinit(mp, ffs_specop_p, ffs_fifoop_p, &vp);
 
+#ifdef XIP
+       if ((vp->v_mount->mnt_iflag & IMNT_XIP) != 0 &&
+           vp->v_type == VREG) {
+               vp->v_vflag |= VV_XIP;
+       }
+#endif
+
        /*
         * Finish inode initialization now that aliasing has been resolved.
         */



Home | Main Index | Thread Index | Old Index