mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mm/page_ref: use page_ref helper instead of direct modification of _count
page_reference manipulation functions are introduced to track down reference count change of the page. Use it instead of direct modification of _count. Signed-off-by: Joonsoo Kim <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Johannes Berg <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Sunil Goutham <[email protected]> Cc: Chris Metcalf <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
43efd3ea64
commit
6d061f9f61
4 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ static void nicvf_get_page(struct nicvf *nic)
|
|||
if (!nic->rb_pageref || !nic->rb_page)
|
||||
return;
|
||||
|
||||
atomic_add(nic->rb_pageref, &nic->rb_page->_count);
|
||||
page_ref_add(nic->rb_page, nic->rb_pageref);
|
||||
nic->rb_pageref = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ static inline int qede_realloc_rx_buffer(struct qede_dev *edev,
|
|||
* network stack to take the ownership of the page
|
||||
* which can be recycled multiple times by the driver.
|
||||
*/
|
||||
atomic_inc(&curr_cons->data->_count);
|
||||
page_ref_inc(curr_cons->data);
|
||||
qede_reuse_page(edev, rxq, curr_cons);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue