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/ntfs | |
| 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/ntfs')
| -rw-r--r-- | fs/ntfs/aops.c | 14 | ||||
| -rw-r--r-- | fs/ntfs/compress.c | 18 | ||||
| -rw-r--r-- | fs/ntfs/ntfs.h | 2 | ||||
| -rw-r--r-- | fs/ntfs/super.c | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index 339fbc0969e4..d6b44161ea67 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c @@ -89,7 +89,7 @@ static void end_buffer_read_file_async(struct buffer_head *bh, int uptodate) spin_unlock_irqrestore(&page_uptodate_lock, flags); if (!PageError(page)) SetPageUptodate(page); - UnlockPage(page); + unlock_page(page); return; still_busy: spin_unlock_irqrestore(&page_uptodate_lock, flags); @@ -227,7 +227,7 @@ handle_zblock: SetPageUptodate(page); else /* Signal synchronous i/o error. */ nr = -EIO; - UnlockPage(page); + unlock_page(page); return nr; } @@ -329,7 +329,7 @@ put_unm_unl_err_out: unm_unl_err_out: unmap_mft_record(READ, ni); unl_err_out: - UnlockPage(page); + unlock_page(page); return err; } @@ -388,7 +388,7 @@ static void end_buffer_read_mftbmp_async(struct buffer_head *bh, int uptodate) spin_unlock_irqrestore(&page_uptodate_lock, flags); if (!PageError(page)) SetPageUptodate(page); - UnlockPage(page); + unlock_page(page); return; still_busy: spin_unlock_irqrestore(&page_uptodate_lock, flags); @@ -507,7 +507,7 @@ handle_zblock: SetPageUptodate(page); else /* Signal synchronous i/o error. */ nr = -EIO; - UnlockPage(page); + unlock_page(page); return nr; } @@ -613,7 +613,7 @@ static void end_buffer_read_mst_async(struct buffer_head *bh, int uptodate) SetPageError(page); } } - UnlockPage(page); + unlock_page(page); return; still_busy: spin_unlock_irqrestore(&page_uptodate_lock, flags); @@ -761,7 +761,7 @@ handle_zblock: SetPageUptodate(page); else /* Signal synchronous i/o error. */ nr = -EIO; - UnlockPage(page); + unlock_page(page); return nr; } diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 2a98ac3cfca7..b2fd83191a44 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c @@ -198,7 +198,7 @@ return_error: flush_dcache_page(dp); kunmap(dp); SetPageUptodate(dp); - UnlockPage(dp); + unlock_page(dp); if (di == xpage) *xpage_done = 1; else @@ -491,7 +491,7 @@ int ntfs_file_read_compressed_block(struct page *page) kfree(bhs); kfree(pages); SetPageError(page); - UnlockPage(page); + unlock_page(page); ntfs_error(vol->sb, "Failed to allocate internal buffers."); return -ENOMEM; } @@ -521,13 +521,13 @@ int ntfs_file_read_compressed_block(struct page *page) * in and/or dirty or we would be losing data or at * least wasting our time. */ - if (!PageDirty(page) && (!Page_Uptodate(page) || + if (!PageDirty(page) && (!PageUptodate(page) || PageError(page))) { ClearPageError(page); kmap(page); continue; } - UnlockPage(page); + unlock_page(page); page_cache_release(page); pages[i] = NULL; } @@ -668,7 +668,7 @@ retry_remap: flush_dcache_page(page); kunmap(page); SetPageUptodate(page); - UnlockPage(page); + unlock_page(page); if (cur_page == xpage) xpage_done = 1; else @@ -738,7 +738,7 @@ retry_remap: flush_dcache_page(page); kunmap(page); SetPageUptodate(page); - UnlockPage(page); + unlock_page(page); if (cur2_page == xpage) xpage_done = 1; else @@ -775,7 +775,7 @@ retry_remap: SetPageError(page); flush_dcache_page(page); kunmap(page); - UnlockPage(page); + unlock_page(page); if (prev_cur_page != xpage) page_cache_release(page); pages[prev_cur_page] = NULL; @@ -806,7 +806,7 @@ retry_remap: SetPageError(page); flush_dcache_page(page); kunmap(page); - UnlockPage(page); + unlock_page(page); if (cur_page != xpage) page_cache_release(page); pages[cur_page] = NULL; @@ -853,7 +853,7 @@ err_out: SetPageError(page); flush_dcache_page(page); kunmap(page); - UnlockPage(page); + unlock_page(page); if (i != xpage) page_cache_release(page); } diff --git a/fs/ntfs/ntfs.h b/fs/ntfs/ntfs.h index fff7d8357847..de5a04967f61 100644 --- a/fs/ntfs/ntfs.h +++ b/fs/ntfs/ntfs.h @@ -190,7 +190,7 @@ static inline struct page *ntfs_map_page(struct address_space *mapping, if (!IS_ERR(page)) { wait_on_page(page); kmap(page); - if (Page_Uptodate(page) && !PageError(page)) + if (PageUptodate(page) && !PageError(page)) return page; ntfs_unmap_page(page); return ERR_PTR(-EIO); diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index c7acc41aa346..bbff13e0ea05 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -1215,7 +1215,7 @@ handle_partial_page: continue; } wait_on_page(page); - if (!Page_Uptodate(page)) { + if (!PageUptodate(page)) { ntfs_debug("Async read_cache_page() error. Skipping " "page (index 0x%lx).", index - 1); /* Ignore pages which errored asynchronously. */ @@ -1298,7 +1298,7 @@ handle_partial_page: continue; } wait_on_page(page); - if (!Page_Uptodate(page)) { + if (!PageUptodate(page)) { ntfs_debug("Async read_cache_page() error. Skipping " "page (index 0x%lx).", index - 1); /* Ignore pages which errored asynchronously. */ |
