Commit 5237c441 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Greg Kroah-Hartman

staging/lustre: fix for invalidatepage() API change

somehow this got dropped during merge window...
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b69835a2
...@@ -53,7 +53,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page) ...@@ -53,7 +53,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
return; return;
if (PagePrivate(page)) 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); cancel_dirty_page(page, PAGE_SIZE);
ClearPageMappedToDisk(page); ClearPageMappedToDisk(page);
......
...@@ -72,7 +72,8 @@ ...@@ -72,7 +72,8 @@
* aligned truncate). Lustre leaves partially truncated page in the cache, * aligned truncate). Lustre leaves partially truncated page in the cache,
* relying on struct inode::i_size to limit further accesses. * 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 inode *inode;
struct lu_env *env; struct lu_env *env;
...@@ -89,7 +90,7 @@ static void ll_invalidatepage(struct page *vmpage, unsigned long offset) ...@@ -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 * below because they are run with page locked and all our io is
* happening with locked page too * happening with locked page too
*/ */
if (offset == 0) { if (offset == 0 && length == PAGE_CACHE_SIZE) {
env = cl_env_get(&refcheck); env = cl_env_get(&refcheck);
if (!IS_ERR(env)) { if (!IS_ERR(env)) {
inode = vmpage->mapping->host; inode = vmpage->mapping->host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment