PERFORCE change 169439 for review

Aditya Sarawgi truncs at FreeBSD.org
Mon Oct 12 20:44:16 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=169439

Change 169439 by truncs at aditya on 2009/10/12 20:43:31

	Add mutex for protecting the mount struct and fs.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_mount.h#3 edit

Differences ...

==== //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_mount.h#3 (text+ko) ====

@@ -54,10 +54,16 @@
 	u_long	um_bptrtodb;			/* indir ptr to disk block */
 	u_long	um_seqinc;			/* inc between seq blocks */
 
+	struct mtx um_lock;			/* Protects ext2mount & fs */
+
 	struct g_consumer *um_cp;
 	struct bufobj *um_bo;
 };
 
+#define EXT2_LOCK(aa)	mtx_lock(&(aa)->um_lock)
+#define EXT2_UNLOCK(aa)	mtx_unlock(&(aa)->um_lock)
+#define EXT2_MTX(aa)	(&(aa)->um_lock)
+
 /* Convert mount ptr to ext2fsmount ptr. */
 #define VFSTOEXT2(mp)	((struct ext2mount *)((mp)->mnt_data))
 


More information about the p4-projects mailing list