+1
−7
+0
−5
+9
−0
+0
−2
+2
−2
Loading
mainline inclusion from mainline-v5.9-rc1 commit 85e0cbbb category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAGRKP CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=85e0cbbb8a79537dbc465e9deb449a08b2b092a6 -------------------------------- We were only creating the request_queue debugfs_dir only for make_request block drivers (multiqueue), but never for request-based block drivers. We did this as we were only creating non-blktrace additional debugfs files on that directory for make_request drivers. However, since blktrace *always* creates that directory anyway, we special-case the use of that directory on blktrace. Other than this being an eye-sore, this exposes request-based block drivers to the same debugfs fragile race that used to exist with make_request block drivers where if we start adding files onto that directory we can later run a race with a double removal of dentries on the directory if we don't deal with this carefully on blktrace. Instead, just simplify things by always creating the request_queue debugfs_dir on request_queue registration. Rename the mutex also to reflect the fact that this is used outside of the blktrace context. Signed-off-by:Luis Chamberlain <mcgrof@kernel.org> Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk> Conflicts: block/blk-core.c block/blk-sysfs.c block/blk.h include/linux/blkdev.h kernel/trace/blktrace.c [Context conflicts] Signed-off-by:
Yu Kuai <yukuai3@huawei.com>