Re: [RFC PATCH] md/raid1: remove unused bio in sync_request_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 15, 2017 at 05:00:25PM +0800, Guoqing Jiang wrote:
> The "bio" is not used in sync_request_write after commit a68e58703575
> ("md/raid1: split out two sub-functions from sync_request_write").

applied, wondering why gcc doesn't report this.
 
> Signed-off-by: Guoqing Jiang <gqjiang@xxxxxxxx>
> ---
> Not sure if my understanding is right, so it is for RFC. 
> 
>  drivers/md/raid1.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index 6701993..9c51e31 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -2181,9 +2181,7 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio)
>  	struct r1conf *conf = mddev->private;
>  	int i;
>  	int disks = conf->raid_disks * 2;
> -	struct bio *bio, *wbio;
> -
> -	bio = r1_bio->bios[r1_bio->read_disk];
> +	struct bio *wbio;
>  
>  	if (!test_bit(R1BIO_Uptodate, &r1_bio->state))
>  		/* ouch - failed to read all of that. */
> -- 
> 2.10.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux