summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-12-13 09:41:59 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-12-13 09:41:59 +0200
commit9b18d42dda985c99db4adde45bbdf7cd79a7525c (patch)
tree78481b44090a9ee19780091ade05a320cbc6a7bb /fs/dax.c
parent39bdb17ebb5bd7a5c8a231d7cac4a4d5ccc58149 (diff)
parent1b894521e60c1b91db1e8ba1278660e5c89f1b5f (diff)
Merge tag 'mac80211-next-for-davem-2015-12-07' into next
This pull request got a bit bigger than I wanted, due to needing to reshuffle and fix some bugs. I merged mac80211 to get the right base for some of these changes. * new mac80211 API for upcoming driver changes: EOSP handling, key iteration * scan abort changes allowing to cancel an ongoing scan * VHT IBSS 80+80 MHz support * re-enable full AP client state tracking after fixes * various small fixes (that weren't relevant for mac80211) * various cleanups
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/dax.c b/fs/dax.c
index a86d3cc2b3894..d1e5cb7311a1d 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -29,6 +29,11 @@
#include <linux/uio.h>
#include <linux/vmstat.h>
+/*
+ * dax_clear_blocks() is called from within transaction context from XFS,
+ * and hence this means the stack from this point must follow GFP_NOFS
+ * semantics for all operations.
+ */
int dax_clear_blocks(struct inode *inode, sector_t block, long size)
{
struct block_device *bdev = inode->i_sb->s_bdev;
@@ -169,8 +174,10 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
else
len = iov_iter_zero(max - pos, iter);
- if (!len)
+ if (!len) {
+ retval = -EFAULT;
break;
+ }
pos += len;
addr += len;
@@ -622,6 +629,13 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
if ((length < PMD_SIZE) || (pfn & PG_PMD_COLOUR))
goto fallback;
+ /*
+ * TODO: teach vmf_insert_pfn_pmd() to support
+ * 'pte_special' for pmds
+ */
+ if (pfn_valid(pfn))
+ goto fallback;
+
if (buffer_unwritten(&bh) || buffer_new(&bh)) {
int i;
for (i = 0; i < PTRS_PER_PMD; i++)