dax: guarantee page aligned results from bdev_direct_access()
authorDan Williams <dan.j.williams@intel.com>
Sat, 16 Jan 2016 00:55:56 +0000 (16:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2016 01:56:32 +0000 (17:56 -0800)
commitfe683adabfe6629c0b6db32bbbc1ce6cacbf2117
tree16798d03701b19665bcfcdfdf7796c4b52641242
parent0e749e54244eec87b2a3cd0a4314e60bc6781115
dax: guarantee page aligned results from bdev_direct_access()

If a ->direct_access() implementation ever returns a map count less than
PAGE_SIZE, catch the error in bdev_direct_access().  This simplifies
error checking in upper layers.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reported-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/block_dev.c
fs/dax.c