[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH V4 1/9] block: add a helper function to read nr_setcs
- To: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
- From: Chaitanya Kulkarni <Chaitanya.Kulkarni@xxxxxxx>
- Date: Fri, 12 Jul 2019 16:09:56 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chaitanya.Kulkarni@xxxxxxx;
- Cc: Damien Le Moal <Damien.LeMoal@xxxxxxx>, "linux-btrace@xxxxxxxxxxxxxxx" <linux-btrace@xxxxxxxxxxxxxxx>, "bvanassche@xxxxxxx" <bvanassche@xxxxxxx>, "linux-scsi@xxxxxxxxxxxxxxx" <linux-scsi@xxxxxxxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "yuchao0@xxxxxxxxxx" <yuchao0@xxxxxxxxxx>, "colyli@xxxxxxx" <colyli@xxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "linux-bcache@xxxxxxxxxxxxxxx" <linux-bcache@xxxxxxxxxxxxxxx>, "jaegeuk@xxxxxxxxxx" <jaegeuk@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "kent.overstreet@xxxxxxxxx" <kent.overstreet@xxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 12 Jul 2019 16:10:11 +0000
- Ironport-sdr: D7AKZ0sFotlHabHpoZYaGMlm/sydqrz7/jqe+0fse36zw+twTcdZhYTT7MlL0ogV0CKYTD55Gf Bsr2889sTfy/fjz0AmhXWUW/HzFzQVnlr9a939AsqK2BjTAwJgbdLKHdPZkJ4/1uutLKEUG2oS ixF0mtoh0DBGZKyxKNd0HIZZnMM0sayw/CHbgPIBMhOWqf1HSDECJbNf6uFj+O8f9fBDElS60m eAOWlVIw9dMYzDqHv41RHTXPlHbO80gMayCx1rw5SnOhmQ6xfbWc0WIU1B5s3ZLJAflbLLFuQ3 mOo=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVNb2Z4KyEErtQ+UKxJ+HV/zvqXg==
- Thread-topic: [PATCH V4 1/9] block: add a helper function to read nr_setcs
- Wdcipoutbound: EOP-TRUE
On 7/11/19 6:59 PM, Martin K. Petersen wrote:
> Hi Chaitanya,
>
>> +static inline sector_t bdev_nr_sects(struct block_device *bdev)
>> +{
>> + return part_nr_sects_read(bdev->bd_part);
>> +}
> Can bdev end up being NULL in any of the call sites?
>
> Otherwise no objections.
>
Thanks for mentioning that. Initial version which was not posted had
that check.
This series just replaces the existing accesses without changing anything.
So if any of the exiting code has that bug then it will blow up nicely.
For future callers I don't mind adding a new check and resend the series.
Would you prefer adding a check ?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|