]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/lustre/lustre/llite/rw26.c
staging/lustre: fix for invalidatepage() API change
[karo-tx-linux.git] / drivers / staging / lustre / lustre / llite / rw26.c
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;