Commit 2cbed890 authored by Al Viro's avatar Al Viro

[PATCH] fix bogus argument of blkdev_put() in pktcdvd

final close of ->bdev should match the initial open, i.e.
get FMODE_READ | FMODE_NDELAY; FMODE_READ|FMODE_WRITE has
been a braino.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent fc9161e5
...@@ -2790,7 +2790,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) ...@@ -2790,7 +2790,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
return 0; return 0;
out_mem: out_mem:
blkdev_put(bdev, FMODE_READ|FMODE_WRITE); blkdev_put(bdev, FMODE_READ | FMODE_NDELAY);
/* This is safe: open() is still holding a reference. */ /* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE); module_put(THIS_MODULE);
return ret; return ret;
...@@ -2975,7 +2975,7 @@ static int pkt_remove_dev(dev_t pkt_dev) ...@@ -2975,7 +2975,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
pkt_debugfs_dev_remove(pd); pkt_debugfs_dev_remove(pd);
pkt_sysfs_dev_remove(pd); pkt_sysfs_dev_remove(pd);
blkdev_put(pd->bdev, FMODE_READ|FMODE_WRITE); blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY);
remove_proc_entry(pd->name, pkt_proc); remove_proc_entry(pd->name, pkt_proc);
DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name); DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name);
......
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