fs: move struct kiocb to fs.h
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / fs / ntfs / file.c
index f5ec1ce7a53284969d600b4fb4027fc9e387d40d..f16f2d8401febeaf4911491e92f8deac377e8a93 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * file.c - NTFS kernel file operations.  Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001-2011 Anton Altaparmakov and Tuxera Inc.
+ * Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -19,6 +19,7 @@
  * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/backing-dev.h>
 #include <linux/buffer_head.h>
 #include <linux/gfp.h>
 #include <linux/pagemap.h>
@@ -27,7 +28,6 @@
 #include <linux/swap.h>
 #include <linux/uio.h>
 #include <linux/writeback.h>
-#include <linux/aio.h>
 
 #include <asm/page.h>
 #include <asm/uaccess.h>
@@ -410,7 +410,8 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping,
        BUG_ON(!nr_pages);
        err = nr = 0;
        do {
-               pages[nr] = find_lock_page(mapping, index);
+               pages[nr] = find_get_page_flags(mapping, index, FGP_LOCK |
+                               FGP_ACCESSED);
                if (!pages[nr]) {
                        if (!*cached_page) {
                                *cached_page = page_cache_alloc(mapping);
@@ -2090,7 +2091,7 @@ static ssize_t ntfs_file_aio_write_nolock(struct kiocb *iocb,
        count = iov_length(iov, nr_segs);
        pos = *ppos;
        /* We can write back this queue in page reclaim. */
-       current->backing_dev_info = mapping->backing_dev_info;
+       current->backing_dev_info = inode_to_bdi(inode);
        written = 0;
        err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode));
        if (err)