aboutsummaryrefslogtreecommitdiffstats
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
commit0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch)
tree41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /mm/readahead.c
parentaa877175e7a9982233ed8f10cb4bfddd78d82741 (diff)
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'mm/readahead.c')
-rw-r--r--mm/readahead.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 65ec288dc057..c8a955b1297e 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/dax.h>
11#include <linux/gfp.h> 12#include <linux/gfp.h>
12#include <linux/export.h> 13#include <linux/export.h>
13#include <linux/blkdev.h> 14#include <linux/blkdev.h>
@@ -544,6 +545,14 @@ do_readahead(struct address_space *mapping, struct file *filp,
544 if (!mapping || !mapping->a_ops) 545 if (!mapping || !mapping->a_ops)
545 return -EINVAL; 546 return -EINVAL;
546 547
548 /*
549 * Readahead doesn't make sense for DAX inodes, but we don't want it
550 * to report a failure either. Instead, we just return success and
551 * don't do any work.
552 */
553 if (dax_mapping(mapping))
554 return 0;
555
547 return force_page_cache_readahead(mapping, filp, index, nr); 556 return force_page_cache_readahead(mapping, filp, index, nr);
548} 557}
549 558