Skip to content

Commit 10caa8b

Browse files
Steve Sistarejgunthorpe
authored andcommitted
iommufd: Export do_update_pinned
Export do_update_pinned. No functional change. Link: https://patch.msgid.link/r/[email protected] Signed-off-by: Steve Sistare <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent d68beb2 commit 10caa8b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

drivers/iommu/iommufd/io_pagetable.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,9 @@ struct iopt_pages_access {
252252
unsigned int users;
253253
};
254254

255+
struct pfn_reader_user;
256+
257+
int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages,
258+
bool inc, struct pfn_reader_user *user);
259+
255260
#endif

drivers/iommu/iommufd/pages.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,8 @@ static int update_mm_locked_vm(struct iopt_pages *pages, unsigned long npages,
985985
return rc;
986986
}
987987

988-
static int do_update_pinned(struct iopt_pages *pages, unsigned long npages,
989-
bool inc, struct pfn_reader_user *user)
988+
int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages,
989+
bool inc, struct pfn_reader_user *user)
990990
{
991991
int rc = 0;
992992

@@ -1020,8 +1020,8 @@ static void update_unpinned(struct iopt_pages *pages)
10201020
return;
10211021
if (pages->npinned == pages->last_npinned)
10221022
return;
1023-
do_update_pinned(pages, pages->last_npinned - pages->npinned, false,
1024-
NULL);
1023+
iopt_pages_update_pinned(pages, pages->last_npinned - pages->npinned,
1024+
false, NULL);
10251025
}
10261026

10271027
/*
@@ -1051,7 +1051,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user,
10511051
npages = pages->npinned - pages->last_npinned;
10521052
inc = true;
10531053
}
1054-
return do_update_pinned(pages, npages, inc, user);
1054+
return iopt_pages_update_pinned(pages, npages, inc, user);
10551055
}
10561056

10571057
/*

0 commit comments

Comments
 (0)