]> www.infradead.org Git - users/willy/pagecache.git/commit
fuse: block request allocation until io-uring init is complete
authorBernd Schubert <bernd@bsbernd.com>
Mon, 20 Jan 2025 01:29:09 +0000 (02:29 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 27 Jan 2025 17:02:23 +0000 (18:02 +0100)
commit3393ff964e0fa5def66570c54a4612bf9df06b76
treeda235d5838d4ae0781b099380b23c96eec0d33c0
parentb6236c8407cba5d7a108facb1bcfab24994d3814
fuse: block request allocation until io-uring init is complete

Avoid races and block request allocation until io-uring
queues are ready.

This is a especially important for background requests,
as bg request completion might cause lock order inversion
of the typical queue->lock and then fc->bg_lock

    fuse_request_end
       spin_lock(&fc->bg_lock);
       flush_bg_queue
         fuse_send_one
           fuse_uring_queue_fuse_req
           spin_lock(&queue->lock);

Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Reviewed-by: Luis Henriques <luis@igalia.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
fs/fuse/dev_uring.c
fs/fuse/fuse_i.h
fs/fuse/inode.c