[PATCH] Fix ext2_fs_sb.h for user space

Thomas Koeller <[email protected]>
Newsgroups gmane.comp.file-systems.ext2.devel
Message-ID <[email protected]>
This patch modifies the EXT2 superblock header file
so that it can be included by user-space programs.

Signed-off-by: Thomas Koeller <[email protected]>


---

 include/linux/ext2_fs_sb.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

1a75ff23bfe0db7ec765705134a64de0c00e4b3c
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h
index 4eda0ed..8c57a80 100644
--- a/include/linux/ext2_fs_sb.h
+++ b/include/linux/ext2_fs_sb.h
@@ -16,8 +16,12 @@
 #ifndef _LINUX_EXT2_FS_SB
 #define _LINUX_EXT2_FS_SB
 
+#include <linux/spinlock_types.h>
+
+#ifdef __KERNEL__
 #include <linux/blockgroup_lock.h>
 #include <linux/percpu_counter.h>
+#endif
 
 /*
  * second extended-fs super-block data in memory
@@ -46,13 +50,15 @@ struct ext2_sb_info {
 	int s_inode_size;
 	int s_first_ino;
 	spinlock_t s_next_gen_lock;
-	u32 s_next_generation;
+	__u32 s_next_generation;
 	unsigned long s_dir_count;
-	u8 *s_debts;
+	__u8 *s_debts;
+#ifdef __KERNEL__
 	struct percpu_counter s_freeblocks_counter;
 	struct percpu_counter s_freeinodes_counter;
 	struct percpu_counter s_dirs_counter;
 	struct blockgroup_lock s_blockgroup_lock;
+#endif
 };
 
 #endif	/* _LINUX_EXT2_FS_SB */
-- 
1.3.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.