diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-06-02 03:24:28 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-06-02 03:24:28 -0700 |
| commit | 53b478c60dd9914ce1668128ba466188ef42c918 (patch) | |
| tree | d6a56d2a8f119732599fb0ebafe6b4d1cc440d50 /include/linux | |
| parent | 6979fbf7a1ec35046cfe9ef4d11fd09f02de31cd (diff) | |
[PATCH] rename flushpage to invalidatepage
Fixes a pet peeve: the identifier "flushpage" implies "flush the page
to disk". Which is very much not what the flushpage functions actually
do.
The patch renames block_flushpage and the flushpage
address_space_operation to "invalidatepage".
It also fixes a buglet in invalidate_this_page2(), which was calling
block_flushpage() directly - it needs to call do_flushpage() (now
do_invalidatepage()) so that the filesystem's ->flushpage (now
->invalidatepage) a_op gets a chance to relinquish any interest which
it has in the page's buffers.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/buffer_head.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/jbd.h | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 38e533d62fa9..90767fc78617 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -191,7 +191,7 @@ void FASTCALL(unlock_buffer(struct buffer_head *bh)); * address_spaces. */ int try_to_release_page(struct page * page, int gfp_mask); -int block_flushpage(struct page *page, unsigned long offset); +int block_invalidatepage(struct page *page, unsigned long offset); int block_write_full_page(struct page*, get_block_t*); int block_read_full_page(struct page*, get_block_t*); int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); diff --git a/include/linux/fs.h b/include/linux/fs.h index f4ae9af76b69..839dfbd712e2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -306,7 +306,7 @@ struct address_space_operations { int (*commit_write)(struct file *, struct page *, unsigned, unsigned); /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ int (*bmap)(struct address_space *, long); - int (*flushpage) (struct page *, unsigned long); + int (*invalidatepage) (struct page *, unsigned long); int (*releasepage) (struct page *, int); #define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */ int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int); diff --git a/include/linux/jbd.h b/include/linux/jbd.h index d0c52537a274..835d38c9dbfc 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -641,7 +641,8 @@ extern int journal_dirty_metadata (handle_t *, struct buffer_head *); extern void journal_release_buffer (handle_t *, struct buffer_head *); extern void journal_forget (handle_t *, struct buffer_head *); extern void journal_sync_buffer (struct buffer_head *); -extern int journal_flushpage(journal_t *, struct page *, unsigned long); +extern int journal_invalidatepage(journal_t *, + struct page *, unsigned long); extern int journal_try_to_free_buffers(journal_t *, struct page *, int); extern int journal_stop(handle_t *); extern int journal_flush (journal_t *); |
