Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Adrian Bunk and committed by
Linus Torvalds
06270d5d 0dab9cfa

+4
+4
fs/ioctl.c
··· 226 226 return error; 227 227 } 228 228 229 + #ifdef CONFIG_BLOCK 230 + 229 231 #define blk_to_logical(inode, blk) (blk << (inode)->i_blkbits) 230 232 #define logical_to_blk(inode, offset) (offset >> (inode)->i_blkbits); 231 233 ··· 343 341 return ret; 344 342 } 345 343 EXPORT_SYMBOL(generic_block_fiemap); 344 + 345 + #endif /* CONFIG_BLOCK */ 346 346 347 347 static int file_ioctl(struct file *filp, unsigned int cmd, 348 348 unsigned long arg)