From: Adrian Bunk Date: Sun, 12 Oct 2008 04:15:19 +0000 (+0300) Subject: provide generic_block_fiemap() only with BLOCK=y X-Git-Tag: v2.6.28-rc1~704 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=06270d5d6aefb46b88bf44a7c5b1b9b3ef352c48;p=linux-2.6-omap-h63xx.git 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 Acked-by: Josef Bacik Signed-off-by: Linus Torvalds --- diff --git a/fs/ioctl.c b/fs/ioctl.c index 33a6b7ecb8b..d152856c371 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -226,6 +226,8 @@ static int ioctl_fiemap(struct file *filp, unsigned long arg) return error; } +#ifdef CONFIG_BLOCK + #define blk_to_logical(inode, blk) (blk << (inode)->i_blkbits) #define logical_to_blk(inode, offset) (offset >> (inode)->i_blkbits); @@ -342,6 +344,8 @@ int generic_block_fiemap(struct inode *inode, } EXPORT_SYMBOL(generic_block_fiemap); +#endif /* CONFIG_BLOCK */ + static int file_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {