diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-10-12 00:15:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-12 14:44:37 -0400 |
commit | 06270d5d6aefb46b88bf44a7c5b1b9b3ef352c48 (patch) | |
tree | 61ddb0c8a8634aefb317d45073acf1563e6e6df0 /fs | |
parent | 0dab9cfa17179d1f5b067a32a3bca06cd31a3149 (diff) |
provide generic_block_fiemap() only with BLOCK=y
This fixes the following compile error with CONFIG_BLOCK=n caused by
commit 68c9d702bb72f367f3b148963ec6cf5e07ff7f65 ("generic block based
fiemap implementation"):
CC fs/ioctl.o
fs/ioctl.c: In function 'generic_block_fiemap':
fs/ioctl.c:249: error: storage size of 'tmp' isn't known
fs/ioctl.c:272: error: invalid application of 'sizeof' to incomplete type 'struct buffer_head'
fs/ioctl.c:280: error: implicit declaration of function 'buffer_mapped'
fs/ioctl.c:249: warning: unused variable 'tmp'
make[2]: *** [fs/ioctl.o] Error 1
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ioctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index 33a6b7ecb8b8..d152856c371b 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -226,6 +226,8 @@ static int ioctl_fiemap(struct file *filp, unsigned long arg) | |||
226 | return error; | 226 | return error; |
227 | } | 227 | } |
228 | 228 | ||
229 | #ifdef CONFIG_BLOCK | ||
230 | |||
229 | #define blk_to_logical(inode, blk) (blk << (inode)->i_blkbits) | 231 | #define blk_to_logical(inode, blk) (blk << (inode)->i_blkbits) |
230 | #define logical_to_blk(inode, offset) (offset >> (inode)->i_blkbits); | 232 | #define logical_to_blk(inode, offset) (offset >> (inode)->i_blkbits); |
231 | 233 | ||
@@ -342,6 +344,8 @@ int generic_block_fiemap(struct inode *inode, | |||
342 | } | 344 | } |
343 | EXPORT_SYMBOL(generic_block_fiemap); | 345 | EXPORT_SYMBOL(generic_block_fiemap); |
344 | 346 | ||
347 | #endif /* CONFIG_BLOCK */ | ||
348 | |||
345 | static int file_ioctl(struct file *filp, unsigned int cmd, | 349 | static int file_ioctl(struct file *filp, unsigned int cmd, |
346 | unsigned long arg) | 350 | unsigned long arg) |
347 | { | 351 | { |