Skip to content

Commit

Permalink
mm: Convert __do_page_cache_readahead to XArray
Browse files Browse the repository at this point in the history
This one is trivial.

Signed-off-by: Matthew Wilcox <[email protected]>
  • Loading branch information
Matthew Wilcox committed Oct 21, 2018
1 parent 4e17ec2 commit 560d454
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ unsigned int __do_page_cache_readahead(struct address_space *mapping,
if (page_offset > end_index)
break;

rcu_read_lock();
page = radix_tree_lookup(&mapping->i_pages, page_offset);
rcu_read_unlock();
page = xa_load(&mapping->i_pages, page_offset);
if (page && !xa_is_value(page)) {
/*
* Page already present? Kick off the current batch of
Expand Down

0 comments on commit 560d454

Please sign in to comment.