From: Al Viro Date: Sun, 30 Nov 2008 06:33:57 +0000 (-0500) Subject: [PATCH] fix bogus argument of blkdev_put() in pktcdvd X-Git-Tag: 2.1b_release~15097^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cbed8906fd1f3c6cc17cdf8aac1bfad2da7960c;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git [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: Al Viro --- diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index f20bf35..edda7b6 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2790,7 +2790,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) return 0; 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. */ module_put(THIS_MODULE); return ret; @@ -2975,7 +2975,7 @@ static int pkt_remove_dev(dev_t pkt_dev) pkt_debugfs_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); DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name);