buffer: check if buffer fd already readable (#10894)

check if buffer fd is already readable, to avoid a lot of unnecessery
systemcalls and churn.
This commit is contained in:
Tom Englund
2025-07-01 11:32:17 +02:00
committed by GitHub
parent f464dfbefa
commit 9adacef70b

View File

@@ -118,6 +118,9 @@ CFileDescriptor CDMABuffer::exportSyncFile() {
if (fd == -1)
continue;
if (CFileDescriptor::isReadable(fd))
continue;
dma_buf_export_sync_file request{
.flags = DMA_BUF_SYNC_READ,
.fd = -1,