diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-04-29 23:52:37 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-04-29 23:52:37 -0700 |
| commit | aa78091f0f2860df00a4ccc5d4609afd9d831dd0 (patch) | |
| tree | fe91202ae1fed74c403bf6f7cc9caf5a3f2ca5da /fs/ext2/dir.c | |
| parent | 68872e78c90ddfe683bf1c10ee93323f6d640251 (diff) | |
[PATCH] cleanup page flags
page->flags cleanup.
Moves the definitions of the page->flags bits and all the PageFoo
macros into linux/page-flags.h. That file is currently included from
mm.h, but the stage is set to remove that and include page-flags.h
direct in all .c files which require that. (120 of them).
The patch also makes all the page flag macros and functions consistent:
For PG_foo, the following functions are defined:
SetPageFoo
ClearPageFoo
TestSetPageFoo
TestClearPageFoo
PageFoo
and that's it.
- Page_Uptodate is renamed to PageUptodate
- LockPage is removed. All users updated to use SetPageLocked
- UnlockPage is removed. All callers updated to use unlock_page().
it's a real function - there's no need to hide that fact.
- PageTestandClearReferenced renamed to TestClearPageReferenced
- PageSetSlab renamed to SetPageSlab
- __SetPageReserved is removed. It's an infinitesimally small
microoptimisation, and is inconsistent.
- TryLockPage is renamed to TestSetPageLocked
- PageSwapCache() is renamed to page_swap_cache(), so it doesn't
pretend to be a page->flags bit test.
Diffstat (limited to 'fs/ext2/dir.c')
| -rw-r--r-- | fs/ext2/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 247cdca60ba6..a07034d360c1 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -166,7 +166,7 @@ static struct page * ext2_get_page(struct inode *dir, unsigned long n) if (!IS_ERR(page)) { wait_on_page(page); kmap(page); - if (!Page_Uptodate(page)) + if (!PageUptodate(page)) goto fail; if (!PageChecked(page)) ext2_check_page(page); @@ -417,7 +417,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, de->inode = cpu_to_le32(inode->i_ino); ext2_set_de_type (de, inode); err = ext2_commit_chunk(page, from, to); - UnlockPage(page); + unlock_page(page); ext2_put_page(page); dir->i_mtime = dir->i_ctime = CURRENT_TIME; mark_inode_dirty(dir); @@ -512,7 +512,7 @@ got_it: mark_inode_dirty(dir); /* OFFSET_CACHE */ out_unlock: - UnlockPage(page); + unlock_page(page); ext2_put_page(page); out: return err; @@ -553,7 +553,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) pde->rec_len = cpu_to_le16(to-from); dir->inode = 0; err = ext2_commit_chunk(page, from, to); - UnlockPage(page); + unlock_page(page); inode->i_ctime = inode->i_mtime = CURRENT_TIME; mark_inode_dirty(inode); out: @@ -597,7 +597,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent) err = ext2_commit_chunk(page, 0, chunk_size); fail: - UnlockPage(page); + unlock_page(page); page_cache_release(page); return err; } |
