aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
commit1c3f45ab2f7f879ea482501c83899505c31f7539 (patch)
tree672465b3b9b3e2e26a8caf74ed64aa6885c52c13 /drivers/block
parent4bcff1b37e7c3aed914d1ce5b45994adc7dbf455 (diff)
parente0d6d71440a3a35c6fc2dde09f8e8d4d7bd44dda (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index b9a6b7ad64f3..bc56770bcc90 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2021,7 +2021,13 @@ static int pkt_open(struct inode *inode, struct file *file)
2021 BUG_ON(pd->refcnt < 0); 2021 BUG_ON(pd->refcnt < 0);
2022 2022
2023 pd->refcnt++; 2023 pd->refcnt++;
2024 if (pd->refcnt == 1) { 2024 if (pd->refcnt > 1) {
2025 if ((file->f_mode & FMODE_WRITE) &&
2026 !test_bit(PACKET_WRITABLE, &pd->flags)) {
2027 ret = -EBUSY;
2028 goto out_dec;
2029 }
2030 } else {
2025 if (pkt_open_dev(pd, file->f_mode & FMODE_WRITE)) { 2031 if (pkt_open_dev(pd, file->f_mode & FMODE_WRITE)) {
2026 ret = -EIO; 2032 ret = -EIO;
2027 goto out_dec; 2033 goto out_dec;