iommufd: Export do_update_pinned

Export do_update_pinned. No functional change.

Link: https://patch.msgid.link/r/1731527497-16091-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
Steve Sistare 2024-11-13 11:51:34 -08:00 committed by Jason Gunthorpe
parent d68beb276b
commit 10caa8b451
2 changed files with 10 additions and 5 deletions

View File

@ -252,4 +252,9 @@ struct iopt_pages_access {
unsigned int users;
};
struct pfn_reader_user;
int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages,
bool inc, struct pfn_reader_user *user);
#endif

View File

@ -985,8 +985,8 @@ static int update_mm_locked_vm(struct iopt_pages *pages, unsigned long npages,
return rc;
}
static int do_update_pinned(struct iopt_pages *pages, unsigned long npages,
bool inc, struct pfn_reader_user *user)
int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages,
bool inc, struct pfn_reader_user *user)
{
int rc = 0;
@ -1020,8 +1020,8 @@ static void update_unpinned(struct iopt_pages *pages)
return;
if (pages->npinned == pages->last_npinned)
return;
do_update_pinned(pages, pages->last_npinned - pages->npinned, false,
NULL);
iopt_pages_update_pinned(pages, pages->last_npinned - pages->npinned,
false, NULL);
}
/*
@ -1051,7 +1051,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user,
npages = pages->npinned - pages->last_npinned;
inc = true;
}
return do_update_pinned(pages, npages, inc, user);
return iopt_pages_update_pinned(pages, npages, inc, user);
}
/*