summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorTobias Poschwatta2007-11-29 01:21:45 +0100
committerLinus Torvalds2007-11-29 18:24:53 +0100
commit6454d1f9038f708d7deef6270ed4ba5bb6e55869 (patch)
tree447fc22433ed8f16af01353bc93abffc73bc6ddd /fs/ext2
parentIP22ZILOG: fix lockup and sysrq (diff)
downloadkernel-qcow2-linux-6454d1f9038f708d7deef6270ed4ba5bb6e55869.tar.gz
kernel-qcow2-linux-6454d1f9038f708d7deef6270ed4ba5bb6e55869.tar.xz
kernel-qcow2-linux-6454d1f9038f708d7deef6270ed4ba5bb6e55869.zip
fix up ext2_fs.h for userspace after reservations backport
In commit a686cd898bd999fd026a51e90fb0a3410d258ddb: "Val's cross-port of the ext3 reservations code into ext2." include/linux/ext2_fs.h got a new function whose return value is only defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the function seems to help, patch below. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/ext2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 7730388c4931..c87ae29c19cb 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -178,3 +178,10 @@ extern const struct inode_operations ext2_special_inode_operations;
/* symlink.c */
extern const struct inode_operations ext2_fast_symlink_inode_operations;
extern const struct inode_operations ext2_symlink_inode_operations;
+
+static inline ext2_fsblk_t
+ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
+{
+ return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
+ le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
+}