[PATCH v16 15/20] drm/shmem-helper: Add memory shrinker

Boris Brezillon boris.brezillon at collabora.com
Thu Sep 14 13:30:41 UTC 2023


On Thu, 14 Sep 2023 15:27:03 +0200
Boris Brezillon <boris.brezillon at collabora.com> wrote:

> You should drop the '&& refcount_read(&shmem->pages_use_count)',
> otherwise you'll never enter this branch (sgt allocation retained
> a ref, so pages_use_count > 0 when ->sgt != NULL).

Sorry for the brain fart. You can drop this extra test because its
redundant (->sgt != NULL implies pages_use_count > 0), but it shouldn't
prevent you from entering the branch.


More information about the dri-devel mailing list