summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-21 23:02:56 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-21 23:02:56 +0300
commit3413efa8885d7a714c54c6752eaf49fd17d351c9 (patch)
tree8737b11827379324405593e91c60101e6ae7f7ca /lib
parent2a8120d7b4827380f30b57788ff92ec5594e2194 (diff)
parent811ba89a8838e7c43ff46b6210ba1878bfe4437e (diff)
downloadlinux-3413efa8885d7a714c54c6752eaf49fd17d351c9.tar.xz
Merge tag 'pull-bd_flags-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull bdev flags update from Al Viro: "Compactifying bdev flags. We can easily have up to 24 flags with sane atomicity, _without_ pushing anything out of the first cacheline of struct block_device" * tag 'pull-bd_flags-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bdev: move ->bd_make_it_fail to ->__bd_flags bdev: move ->bd_ro_warned to ->__bd_flags bdev: move ->bd_has_subit_bio to ->__bd_flags bdev: move ->bd_write_holder into ->__bd_flags bdev: move ->bd_read_only to ->__bd_flags bdev: infrastructure for flags wrapper for access to ->bd_partno Use bdev_is_paritition() instead of open-coding it
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 552738f14275..cdd4e2314bfc 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -966,13 +966,13 @@ char *bdev_name(char *buf, char *end, struct block_device *bdev,
hd = bdev->bd_disk;
buf = string(buf, end, hd->disk_name, spec);
- if (bdev->bd_partno) {
+ if (bdev_is_partition(bdev)) {
if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) {
if (buf < end)
*buf = 'p';
buf++;
}
- buf = number(buf, end, bdev->bd_partno, spec);
+ buf = number(buf, end, bdev_partno(bdev), spec);
}
return buf;
}