aboutsummaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-11-02 17:32:54 +0100
committerThomas Gleixner <tglx@linutronix.de>2015-11-02 17:32:54 +0100
commit615240e75926a656ac1c6b118ee8a7babc35142d (patch)
tree506fc67e9c1eb403905d30f81f809b542f30a952 /fs/block_dev.c
parent94666f64985e7b83f2af0b03a7849686d2590103 (diff)
parent10f9e3bce7f3ab7ab4d09a9b78c7208c9a1455f7 (diff)
Merge branch 'linux-4.1.y' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-4.1.y-rt
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Conflicts: arch/x86/include/asm/preempt.h include/linux/sched.h
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index c7e4163ede87..ccfd31f1df3a 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1234,6 +1234,13 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
goto out_clear;
}
bd_set_size(bdev, (loff_t)bdev->bd_part->nr_sects << 9);
+ /*
+ * If the partition is not aligned on a page
+ * boundary, we can't do dax I/O to it.
+ */
+ if ((bdev->bd_part->start_sect % (PAGE_SIZE / 512)) ||
+ (bdev->bd_part->nr_sects % (PAGE_SIZE / 512)))
+ bdev->bd_inode->i_flags &= ~S_DAX;
}
} else {
if (bdev->bd_contains == bdev) {