summaryrefslogtreecommitdiffstats
path: root/fs/dax.c
diff options
context:
space:
mode:
authorDan Williams2016-01-16 01:55:56 +0100
committerLinus Torvalds2016-01-16 02:56:32 +0100
commitfe683adabfe6629c0b6db32bbbc1ce6cacbf2117 (patch)
tree16798d03701b19665bcfcdfdf7796c4b52641242 /fs/dax.c
parentdax: increase granularity of dax_clear_blocks() operations (diff)
downloadkernel-qcow2-linux-fe683adabfe6629c0b6db32bbbc1ce6cacbf2117.tar.gz
kernel-qcow2-linux-fe683adabfe6629c0b6db32bbbc1ce6cacbf2117.tar.xz
kernel-qcow2-linux-fe683adabfe6629c0b6db32bbbc1ce6cacbf2117.zip
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>
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/dax.c b/fs/dax.c
index 11721c0fc127..1080fb50fa4d 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -52,7 +52,6 @@ int dax_clear_blocks(struct inode *inode, sector_t block, long size)
sz = min_t(long, count, SZ_128K);
clear_pmem(addr, sz);
size -= sz;
- BUG_ON(sz & 511);
sector += sz / 512;
cond_resched();
} while (size);