X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=block%2Fblk-lib.c;fp=block%2Fblk-lib.c;h=e90614fd8d6a420fad17b34f372deb7c99ea8c22;hb=3ad11d7ac8872b1c8da54494721fad8907ee41f7;hp=0d1811e57ac704972f383fb4133386af940a71e6;hpb=857d64485e7c920364688a8a6dd0ffe5774327b6;p=sfrench%2Fcifs-2.6.git diff --git a/block/blk-lib.c b/block/blk-lib.c index 0d1811e57ac7..e90614fd8d6a 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -64,7 +64,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, return -EINVAL; /* In case the discard request is in a partition */ - if (bdev->bd_partno) + if (bdev_is_partition(bdev)) part_offset = bdev->bd_part->start_sect; while (nr_sects) {