RE: [PATCH 7/12] cciss: assign PDE->data before gluing PDE into/proc tree

From: Miller, Mike (OS Dev)
Date: Tue Apr 29 2008 - 11:27:54 EST




> -----Original Message-----
> From: den@xxxxx [mailto:den@xxxxx] On Behalf Of Denis V. Lunev
> Sent: Tuesday, April 29, 2008 6:13 AM
> To: akpm@xxxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Denis V. Lunev; Alexey
> Dobriyan; Eric W. Biederman; ISS StorageDev; Greg Kroah-Hartman
> Subject: [PATCH 7/12] cciss: assign PDE->data before gluing
> PDE into /proc tree
>
> Simply replace proc_create and further data assigned with
> proc_create_data.
>
> Signed-off-by: Denis V. Lunev <den@xxxxxxxxxx>
> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxxx>
> Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
> Cc: <iss_storagedev@xxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>

Acked-by: Mike Miller <mike.miller@xxxxxx>

> ---
> drivers/block/cciss.c | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> index e539be5..e336b05 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -428,13 +428,9 @@ static void __devinit cciss_procinit(int i)
> proc_cciss = proc_mkdir("driver/cciss", NULL);
> if (!proc_cciss)
> return;
> - pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR
> | S_IRGRP |
> + pde = proc_create_data(hba[i]->devname, S_IWUSR | S_IRUSR |
> + S_IRGRP |
> S_IROTH, proc_cciss,
> - &cciss_proc_fops);
> - if (!pde)
> - return;
> -
> - pde->data = hba[i];
> + &cciss_proc_fops, hba[i]);
> }
> #endif /* CONFIG_PROC_FS */
>
> --
> 1.5.3.rc5
>
>
--
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/