Re: [PATCH] proc: fix duplicate line in /proc/devices

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

 



Neil Horman <[email protected]> wrote:
>
> Patch to fix a potential duplicate block device line printed after the "Block
> device" header in /proc/devices.  Tested and confirmed working by the reporter.
> 

<looks>

Block devices:
  1 ramdisk
  1 ramdisk
  2 fd
  8 sd

> 
> diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
> index 1d24fea..b097958 100644
> --- a/fs/proc/proc_misc.c
> +++ b/fs/proc/proc_misc.c
> @@ -312,7 +312,6 @@ static void *devinfo_next(struct seq_fil
>  		case BLK_HDR:
>  			info->state = BLK_LIST;
>  			(*pos)++;
> -			break;
>  		case BLK_LIST:
>  			if (get_blkdev_info(info->blkdev,&idummy,&ndummy)) {
>  				/*

OK, so that's the same as CHR_HDR and lines up with the fallthroughs in
devinfo_show().  A somewhat strange way of implementing a state machine,
but I guess it saves a few cycles...

I'll copy the stable-kernel guys - this is 2.6.16.1 material, thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux