From 4db96b71e3caea5bb39053d57683129e0682c66f Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 9 Oct 2014 15:26:55 -0700 Subject: vfs: guard end of device for mpage interface Add guard_bio_eod() check for mpage code in order to allow us to do IO even on the odd last sectors of a device, even if the block size is some multiple of the physical sector size. Using mpage_readpages() for block device requires this guard check. Signed-off-by: Akinobu Mita Cc: Jens Axboe Cc: Alexander Viro Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/internal.h') diff --git a/fs/internal.h b/fs/internal.h index e325b4f9c799..b2623200107b 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -34,6 +34,11 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait) } #endif +/* + * buffer.c + */ +extern void guard_bio_eod(int rw, struct bio *bio); + /* * char_dev.c */ -- cgit v1.2.3-59-g8ed1b