mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
target/iblock: fix holder printing in iblock_show_configfs_dev_params
bd_contains is never NULL for an open block device. In addition ibd_bd is always set to a block device that was exclusively opened by the target code, so the holder is guranteed to be ib_dev as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
74f9445409
commit
57ba105920
@ -611,9 +611,8 @@ static ssize_t iblock_show_configfs_dev_params(struct se_device *dev, char *b)
|
||||
bl += sprintf(b + bl, " ");
|
||||
if (bd) {
|
||||
bl += sprintf(b + bl, "Major: %d Minor: %d %s\n",
|
||||
MAJOR(bd->bd_dev), MINOR(bd->bd_dev), (!bd->bd_contains) ?
|
||||
"" : (bd->bd_holder == ib_dev) ?
|
||||
"CLAIMED: IBLOCK" : "CLAIMED: OS");
|
||||
MAJOR(bd->bd_dev), MINOR(bd->bd_dev),
|
||||
"CLAIMED: IBLOCK");
|
||||
} else {
|
||||
bl += sprintf(b + bl, "Major: 0 Minor: 0\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user