]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/lustre: fix for invalidatepage() API change
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 15 Jul 2013 14:27:17 +0000 (22:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 19:24:05 +0000 (12:24 -0700)
somehow this got dropped during merge window...

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h
drivers/staging/lustre/lustre/llite/rw26.c

index a8e9c0c8ffd235d0965ef2cf1cd76cdd0bb8801e..a260e99a4447ee8b45e6c0f33c9ef18712c41220 100644 (file)
@@ -53,7 +53,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
                return;
 
        if (PagePrivate(page))
-               page->mapping->a_ops->invalidatepage(page, 0);
+               page->mapping->a_ops->invalidatepage(page, 0, PAGE_CACHE_SIZE);
 
        cancel_dirty_page(page, PAGE_SIZE);
        ClearPageMappedToDisk(page);
index 27e4e64bc1e7bfc1021a9fc3fdfca93bcd9d6241..f1a1c5f40a1d4ac4e1a555042177473cc3fa58ce 100644 (file)
@@ -72,7 +72,8 @@
  * aligned truncate). Lustre leaves partially truncated page in the cache,
  * relying on struct inode::i_size to limit further accesses.
  */
-static void ll_invalidatepage(struct page *vmpage, unsigned long offset)
+static void ll_invalidatepage(struct page *vmpage, unsigned int offset,
+                             unsigned int length)
 {
        struct inode     *inode;
        struct lu_env    *env;
@@ -89,7 +90,7 @@ static void ll_invalidatepage(struct page *vmpage, unsigned long offset)
         * below because they are run with page locked and all our io is
         * happening with locked page too
         */
-       if (offset == 0) {
+       if (offset == 0 && length == PAGE_CACHE_SIZE) {
                env = cl_env_get(&refcheck);
                if (!IS_ERR(env)) {
                        inode = vmpage->mapping->host;