Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11801
b: refs/heads/master
c: aaa4059
h: refs/heads/master
i:
  11799: fb2f6fe
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Oct 31, 2005
1 parent 20537c0 commit d342dfe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e812cb5226af32aec91bcbaa8365bd7f921b6ebb
refs/heads/master: aaa4059bc2dca7fa816624a28db1958c3a22df9b
11 changes: 10 additions & 1 deletion trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,15 @@ int block_invalidatepage(struct page *page, unsigned long offset)
}
EXPORT_SYMBOL(block_invalidatepage);

int do_invalidatepage(struct page *page, unsigned long offset)
{
int (*invalidatepage)(struct page *, unsigned long);
invalidatepage = page->mapping->a_ops->invalidatepage;
if (invalidatepage == NULL)
invalidatepage = block_invalidatepage;
return (*invalidatepage)(page, offset);
}

/*
* We attach and possibly dirty the buffers atomically wrt
* __set_page_dirty_buffers() via private_lock. try_to_free_buffers
Expand Down Expand Up @@ -2696,7 +2705,7 @@ int block_write_full_page(struct page *page, get_block_t *get_block,
* they may have been added in ext3_writepage(). Make them
* freeable here, so the page does not leak.
*/
block_invalidatepage(page, 0);
do_invalidatepage(page, 0);
unlock_page(page);
return 0; /* don't care */
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/buffer_head.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ extern int buffer_heads_over_limit;
*/
int try_to_release_page(struct page * page, gfp_t gfp_mask);
int block_invalidatepage(struct page *page, unsigned long offset);
int do_invalidatepage(struct page *page, unsigned long offset);
int block_write_full_page(struct page *page, get_block_t *get_block,
struct writeback_control *wbc);
int block_read_full_page(struct page*, get_block_t*);
Expand Down
11 changes: 1 addition & 10 deletions trunk/mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@
#include <linux/pagemap.h>
#include <linux/pagevec.h>
#include <linux/buffer_head.h> /* grr. try_to_release_page,
block_invalidatepage */
do_invalidatepage */


static int do_invalidatepage(struct page *page, unsigned long offset)
{
int (*invalidatepage)(struct page *, unsigned long);
invalidatepage = page->mapping->a_ops->invalidatepage;
if (invalidatepage == NULL)
invalidatepage = block_invalidatepage;
return (*invalidatepage)(page, offset);
}

static inline void truncate_partial_page(struct page *page, unsigned partial)
{
memclear_highpage_flush(page, partial, PAGE_CACHE_SIZE-partial);
Expand Down

0 comments on commit d342dfe

Please sign in to comment.