ANDROID: dma-buf: heaps: Don't lock unused dmabuf_page_pool mutex

On backports where the dmabuf_page_pool mutex could not be completely
removed because of KMI constraints, we lock the mutex to prevent anyone
from acquiring it. While this is fine for regular builds, lockdep
reports a deadlock because of this behavior. So here we remove the call
to mutex_lock for this unused mutex.

Bug: 269576779
Fixes: d55aeb4029 ("BACKPORT: ANDROID: dma-buf: heaps: replace mutex lock with spinlock")
Change-Id: Ic426b6e435ec4ac7b0355c50ec9ea14d38acfa43
Signed-off-by: T.J. Mercier <tjmercier@google.com>
This commit is contained in:
T.J. Mercier
2023-02-16 19:17:27 +00:00
parent 1d05213028
commit d4d05c6e6e

View File

@@ -144,7 +144,6 @@ struct dmabuf_page_pool *dmabuf_page_pool_create(gfp_t gfp_mask, unsigned int or
pool->gfp_mask = gfp_mask | __GFP_COMP;
pool->order = order;
mutex_init(&pool->mutex); /* No longer used! */
mutex_lock(&pool->mutex); /* Make sure anyone who attempts to acquire this hangs */
mutex_lock(&pool_list_lock);
list_add(&pool->list, &pool_list);