Skip to content

Commit

Permalink
staging/lustre: fix for invalidatepage() API change
Browse files Browse the repository at this point in the history
somehow this got dropped during merge window...

Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
Signed-off-by: Andreas Dilger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
sfrothwell authored and gregkh committed Jul 23, 2013
1 parent b69835a commit 5237c44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/lustre/lustre/llite/rw26.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 5237c44

Please sign in to comment.