Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 12 Jan 2011 20:12:04 +0000 (12:12 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 12 Jan 2011 20:12:04 +0000 (12:12 -0800)
sys/vfs/tmpfs/tmpfs_vfsops.c
sys/vfs/tmpfs/tmpfs_vnops.c

index aa40277..f5af54f 100644 (file)
@@ -269,6 +269,7 @@ tmpfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
        mp->mnt_kern_flag |= MNTK_RD_MPSAFE | MNTK_WR_MPSAFE | MNTK_GA_MPSAFE  |
                             MNTK_IN_MPSAFE | MNTK_SG_MPSAFE;
 #endif
+       mp->mnt_kern_flag |= MNTK_RD_MPSAFE | MNTK_SG_MPSAFE;
        mp->mnt_kern_flag |= MNTK_NOMSYNC;
        mp->mnt_data = (qaddr_t)tmp;
        vfs_getnewfsid(mp);
index c73dda9..022c156 100644 (file)
@@ -450,12 +450,15 @@ tmpfs_read (struct vop_read_args *ap)
                bp = getcacheblk(vp, base_offset, BSIZE);
                if (bp == NULL)
                {
+                       lwkt_gettoken(&vp->v_mount->mnt_token);
                        error = bread(vp, base_offset, BSIZE, &bp);
                        if (error) {
                                brelse(bp);
+                               lwkt_reltoken(&vp->v_mount->mnt_token);
                                kprintf("tmpfs_read bread error %d\n", error);
                                break;
                        }
+                       lwkt_reltoken(&vp->v_mount->mnt_token);
                }
 
                /*
@@ -672,6 +675,7 @@ tmpfs_strategy(struct vop_strategy_args *ap)
                return(0);
        }
 
+       lwkt_gettoken(&vp->v_mount->mnt_token);
        node = VP_TO_TMPFS_NODE(vp);
 
        uobj = node->tn_reg.tn_aobj;
@@ -682,6 +686,7 @@ tmpfs_strategy(struct vop_strategy_args *ap)
         */
        swap_pager_strategy(uobj, bio);
 
+       lwkt_reltoken(&vp->v_mount->mnt_token);
        return 0;
 }