Re: [PATCH 2/2] blkdev: Simple cleanup in blkdev_issue_zeroout()

From: Jeff Moyer
Date: Wed Apr 27 2011 - 10:05:50 EST


Lukas Czerner <lczerner@xxxxxxxxxx> writes:

> In blkdev_issue_zeroout() we are submitting regular WRITE bios, so we do
> not need to check for -EOPNOTSUPP specifically in case of error. Also
> there is no need to have label submit: because there is no way to jump
> out from the while cycle without an error and we really want to exit,
> rather than try again.

Looks good. While we're at it:

while (nr_sects != 0) {
sz = min((sector_t) PAGE_SIZE >> 9 , nr_sects);
if (sz == 0)
/* bio has maximum size possible */
break;

how could sz be equal to zero there?

Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/