Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2011 14:20:27 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218273 - head/sys/fs/ext2fs
Message-ID:  <201102041420.p14EKRvB086847@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Feb  4 14:20:27 2011
New Revision: 218273
URL: http://svn.freebsd.org/changeset/base/218273

Log:
  Collapse duplicate definitions of EXT2_SB().
  
  Submitted by:	Pedro F. Giffuni  giffunip at yahoo

Modified:
  head/sys/fs/ext2fs/ext2fs.h

Modified: head/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- head/sys/fs/ext2fs/ext2fs.h	Fri Feb  4 14:16:41 2011	(r218272)
+++ head/sys/fs/ext2fs/ext2fs.h	Fri Feb  4 14:20:27 2011	(r218273)
@@ -39,19 +39,6 @@
 
 #include <sys/types.h>
 
-#if defined(_KERNEL)
-/*
- * FreeBSD passes the pointer to the in-core struct with relevant
- * fields to EXT2_SB macro when accessing superblock fields.
- */
-#define EXT2_SB(sb)	(sb)
-#else
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block.  This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb)	(sb)
-#endif
-
 /*
  * Maximal count of links to a file
  */
@@ -118,10 +105,6 @@ struct ext2fs {
 	u_int32_t  reserved2[204];
 };
 
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block.  This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb)	(sb)
 
 /*
  * In-Memory Superblock
@@ -208,6 +191,11 @@ struct m_ext2fs {
 					 | EXT2F_ROCOMPAT_LARGEFILE)
 #define EXT2F_INCOMPAT_SUPP		EXT2F_INCOMPAT_FTYPE
 
+/* Assume that user mode programs are passing in an ext2fs superblock, not
+ * a kernel struct super_block.  This will allow us to call the feature-test
+ * macros from user land. */
+#define EXT2_SB(sb)	(sb)
+
 /*
  * Feature set definitions
  */
@@ -260,6 +248,7 @@ struct ext2_gd {
 
 #define e2fs_cgload(old, new, size) memcpy((new), (old), (size));
 #define e2fs_cgsave(old, new, size) memcpy((new), (old), (size));
+
 /*
  * Macro-instructions used to manage several block sizes
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102041420.p14EKRvB086847>