mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
Use page_count() since that is recommended over using atomic_read() directly.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1209,11 +1209,11 @@ void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim)
|
||||
int len = sg[i].length;
|
||||
int pages = PAGE_ALIGN(len) >> PAGE_SHIFT;
|
||||
while (pages > 0) {
|
||||
if (atomic_read(&p->_count) != 1) {
|
||||
if (page_count(p) != 1) {
|
||||
PRINT_WARNING("Freeing page %p with "
|
||||
"additional owners (_count %d). "
|
||||
"Data corruption possible!",
|
||||
p, atomic_read(&p->_count));
|
||||
p, page_count(p));
|
||||
WARN_ON(1);
|
||||
}
|
||||
pages--;
|
||||
|
||||
Reference in New Issue
Block a user