mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ps3vram: Use proc_create_data() instead of proc_create()
Use proc_create_data() to avoid race conditions. Reported-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
734957c897
commit
3c20e2f279
1 changed files with 3 additions and 5 deletions
|
@ -546,12 +546,10 @@ static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev)
|
|||
struct ps3vram_priv *priv = dev->core.driver_data;
|
||||
struct proc_dir_entry *pde;
|
||||
|
||||
pde = proc_create(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops);
|
||||
if (!pde) {
|
||||
pde = proc_create_data(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops,
|
||||
priv);
|
||||
if (!pde)
|
||||
dev_warn(&dev->core, "failed to create /proc entry\n");
|
||||
return;
|
||||
}
|
||||
pde->data = priv;
|
||||
}
|
||||
|
||||
static int ps3vram_make_request(struct request_queue *q, struct bio *bio)
|
||||
|
|
Loading…
Reference in a new issue