Commit 3c20e2f2 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Benjamin Herrenschmidt

ps3vram: Use proc_create_data() instead of proc_create()

Use proc_create_data() to avoid race conditions.
Reported-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 734957c8
...@@ -546,12 +546,10 @@ static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) ...@@ -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 ps3vram_priv *priv = dev->core.driver_data;
struct proc_dir_entry *pde; struct proc_dir_entry *pde;
pde = proc_create(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops); pde = proc_create_data(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops,
if (!pde) { priv);
if (!pde)
dev_warn(&dev->core, "failed to create /proc entry\n"); 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) static int ps3vram_make_request(struct request_queue *q, struct bio *bio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment