Revision 809b1e4945774c9ec5619a8f4e2189b7b3833c0c authored by Hannes Reinecke on 21 January 2021, 17:50:56 UTC, committed by Mike Snitzer on 21 January 2021, 20:06:45 UTC
This reverts commit
644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()")

dm_get_dev_t() is just used to convert an arbitrary 'path' string
into a dev_t. It doesn't presume that the device is present; that
check will be done later, as the only caller is dm_get_device(),
which does a dm_get_table_device() later on, which will properly
open the device.

So if the path string already _is_ in major:minor representation
we can convert it directly, avoiding a recursion into the filesystem
to lookup the block device.

This avoids a hang in multipath_message() when the filesystem is
inaccessible.

Fixes: 644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()")
Cc: stable@vger.kernel.org
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent 004b8ae
History
File Mode Size
Makefile -rw-r--r-- 1.6 KB
autogroup.c -rw-r--r-- 6.4 KB
autogroup.h -rw-r--r-- 1.4 KB
clock.c -rw-r--r-- 12.1 KB
completion.c -rw-r--r-- 10.0 KB
core.c -rw-r--r-- 230.9 KB
cpuacct.c -rw-r--r-- 8.2 KB
cpudeadline.c -rw-r--r-- 6.3 KB
cpudeadline.h -rw-r--r-- 637 bytes
cpufreq.c -rw-r--r-- 2.7 KB
cpufreq_schedutil.c -rw-r--r-- 26.8 KB
cpupri.c -rw-r--r-- 8.5 KB
cpupri.h -rw-r--r-- 775 bytes
cputime.c -rw-r--r-- 26.0 KB
deadline.c -rw-r--r-- 79.2 KB
debug.c -rw-r--r-- 23.9 KB
fair.c -rw-r--r-- 298.9 KB
features.h -rw-r--r-- 2.4 KB
idle.c -rw-r--r-- 12.1 KB
isolation.c -rw-r--r-- 5.2 KB
loadavg.c -rw-r--r-- 11.2 KB
membarrier.c -rw-r--r-- 19.1 KB
pelt.c -rw-r--r-- 12.3 KB
pelt.h -rw-r--r-- 5.6 KB
psi.c -rw-r--r-- 36.6 KB
rt.c -rw-r--r-- 66.3 KB
sched-pelt.h -rw-r--r-- 616 bytes
sched.h -rw-r--r-- 70.6 KB
smp.h -rw-r--r-- 266 bytes
stats.c -rw-r--r-- 2.9 KB
stats.h -rw-r--r-- 8.0 KB
stop_task.c -rw-r--r-- 3.1 KB
swait.c -rw-r--r-- 3.6 KB
topology.c -rw-r--r-- 59.4 KB
wait.c -rw-r--r-- 14.1 KB
wait_bit.c -rw-r--r-- 6.8 KB

back to top