On 5/22/23 16:02, Emil Velikov wrote: >> -void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem) >> +static int drm_gem_shmem_pin_locked(struct drm_gem_shmem_object *shmem) >> +{ >> + int ret; >> + >> + dma_resv_assert_held(shmem->base.resv); >> + >> + ret = drm_gem_shmem_get_pages(shmem); >> + >> + return ret; > With the assert_held in the getter, it would be less confusing to > inline this and the unpin_locked functions. Sorry, missed this comment earlier. The reason why it's a separate function is because there will be another caller once we'll add the drm-shrinker. -- Best regards, Dmitry