]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/dax.c
ARM: 8418/1: add boot image dependencies to not generate invalid images
[karo-tx-linux.git] / fs / dax.c
index 99b5fbc38992db1f88be1a1e48dad4fda584a0c1..c3e21ccfc358b2da1170c15f09a5946afad0ff16 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -155,7 +155,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
                }
 
                if (iov_iter_rw(iter) == WRITE)
-                       len = copy_from_iter(addr, max - pos, iter);
+                       len = copy_from_iter_nocache(addr, max - pos, iter);
                else if (!hole)
                        len = copy_to_iter(addr, max - pos, iter);
                else
@@ -209,7 +209,8 @@ ssize_t dax_do_io(struct kiocb *iocb, struct inode *inode,
        }
 
        /* Protects against truncate */
-       inode_dio_begin(inode);
+       if (!(flags & DIO_SKIP_DIO_COUNT))
+               inode_dio_begin(inode);
 
        retval = dax_io(inode, iter, pos, end, get_block, &bh);
 
@@ -219,7 +220,8 @@ ssize_t dax_do_io(struct kiocb *iocb, struct inode *inode,
        if ((retval > 0) && end_io)
                end_io(iocb, pos, retval, bh.b_private);
 
-       inode_dio_end(inode);
+       if (!(flags & DIO_SKIP_DIO_COUNT))
+               inode_dio_end(inode);
  out:
        return retval;
 }