mm: clarify the radix_tree exceptional cases
Make the radix_tree exceptional cases, mostly in filemap.c, clearer. It's hard to devise a suitable snappy name that illuminates the use by shmem/tmpfs for swap, while keeping filemap/pagecache/radix_tree generality. And akpm points out that /* radix_tree_deref_retry(page) */ comments look like calls that have been commented out for unknown reason. Skirt the naming difficulty by rearranging these blocks to handle the transient radix_tree_deref_retry(page) case first; then just explain the remaining shmem/tmpfs swap case in a comment. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
e504f3fdd6
commit
8079b1c859
12
mm/shmem.c
12
mm/shmem.c
@@ -332,10 +332,14 @@ repeat:
|
||||
if (unlikely(!page))
|
||||
continue;
|
||||
if (radix_tree_exception(page)) {
|
||||
if (radix_tree_exceptional_entry(page))
|
||||
goto export;
|
||||
/* radix_tree_deref_retry(page) */
|
||||
goto restart;
|
||||
if (radix_tree_deref_retry(page))
|
||||
goto restart;
|
||||
/*
|
||||
* Otherwise, we must be storing a swap entry
|
||||
* here as an exceptional entry: so return it
|
||||
* without attempting to raise page count.
|
||||
*/
|
||||
goto export;
|
||||
}
|
||||
if (!page_cache_get_speculative(page))
|
||||
goto repeat;
|
||||
|
Reference in New Issue
Block a user