diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:16:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:16:26 -0400 |
commit | 6c5103890057b1bb781b26b7aae38d33e4c517d8 (patch) | |
tree | e6e57961dcddcb5841acb34956e70b9dc696a880 /drivers/block/pktcdvd.c | |
parent | 3dab04e6978e358ad2307bca563fabd6c5d2c58b (diff) | |
parent | 9d2e157d970a73b3f270b631828e03eb452d525e (diff) |
Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
Documentation/iostats.txt: bit-size reference etc.
cfq-iosched: removing unnecessary think time checking
cfq-iosched: Don't clear queue stats when preempt.
blk-throttle: Reset group slice when limits are changed
blk-cgroup: Only give unaccounted_time under debug
cfq-iosched: Don't set active queue in preempt
block: fix non-atomic access to genhd inflight structures
block: attempt to merge with existing requests on plug flush
block: NULL dereference on error path in __blkdev_get()
cfq-iosched: Don't update group weights when on service tree
fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
block: Require subsystems to explicitly allocate bio_set integrity mempool
jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
fs: make fsync_buffers_list() plug
mm: make generic_writepages() use plugging
blk-cgroup: Add unaccounted time to timeslice_used.
block: fixup plugging stubs for !CONFIG_BLOCK
block: remove obsolete comments for blkdev_issue_zeroout.
blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
...
Fix up conflicts in fs/{aio.c,super.c}
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 77d70eebb6b2..07a382eaf0a8 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -1606,8 +1606,6 @@ static int kcdrwd(void *foobar) | |||
1606 | min_sleep_time = pkt->sleep_time; | 1606 | min_sleep_time = pkt->sleep_time; |
1607 | } | 1607 | } |
1608 | 1608 | ||
1609 | generic_unplug_device(bdev_get_queue(pd->bdev)); | ||
1610 | |||
1611 | VPRINTK("kcdrwd: sleeping\n"); | 1609 | VPRINTK("kcdrwd: sleeping\n"); |
1612 | residue = schedule_timeout(min_sleep_time); | 1610 | residue = schedule_timeout(min_sleep_time); |
1613 | VPRINTK("kcdrwd: wake up\n"); | 1611 | VPRINTK("kcdrwd: wake up\n"); |
@@ -2796,7 +2794,8 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, | |||
2796 | return ret; | 2794 | return ret; |
2797 | } | 2795 | } |
2798 | 2796 | ||
2799 | static int pkt_media_changed(struct gendisk *disk) | 2797 | static unsigned int pkt_check_events(struct gendisk *disk, |
2798 | unsigned int clearing) | ||
2800 | { | 2799 | { |
2801 | struct pktcdvd_device *pd = disk->private_data; | 2800 | struct pktcdvd_device *pd = disk->private_data; |
2802 | struct gendisk *attached_disk; | 2801 | struct gendisk *attached_disk; |
@@ -2806,9 +2805,9 @@ static int pkt_media_changed(struct gendisk *disk) | |||
2806 | if (!pd->bdev) | 2805 | if (!pd->bdev) |
2807 | return 0; | 2806 | return 0; |
2808 | attached_disk = pd->bdev->bd_disk; | 2807 | attached_disk = pd->bdev->bd_disk; |
2809 | if (!attached_disk) | 2808 | if (!attached_disk || !attached_disk->fops->check_events) |
2810 | return 0; | 2809 | return 0; |
2811 | return attached_disk->fops->media_changed(attached_disk); | 2810 | return attached_disk->fops->check_events(attached_disk, clearing); |
2812 | } | 2811 | } |
2813 | 2812 | ||
2814 | static const struct block_device_operations pktcdvd_ops = { | 2813 | static const struct block_device_operations pktcdvd_ops = { |
@@ -2816,7 +2815,7 @@ static const struct block_device_operations pktcdvd_ops = { | |||
2816 | .open = pkt_open, | 2815 | .open = pkt_open, |
2817 | .release = pkt_close, | 2816 | .release = pkt_close, |
2818 | .ioctl = pkt_ioctl, | 2817 | .ioctl = pkt_ioctl, |
2819 | .media_changed = pkt_media_changed, | 2818 | .check_events = pkt_check_events, |
2820 | }; | 2819 | }; |
2821 | 2820 | ||
2822 | static char *pktcdvd_devnode(struct gendisk *gd, mode_t *mode) | 2821 | static char *pktcdvd_devnode(struct gendisk *gd, mode_t *mode) |
@@ -2889,6 +2888,10 @@ static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev) | |||
2889 | if (ret) | 2888 | if (ret) |
2890 | goto out_new_dev; | 2889 | goto out_new_dev; |
2891 | 2890 | ||
2891 | /* inherit events of the host device */ | ||
2892 | disk->events = pd->bdev->bd_disk->events; | ||
2893 | disk->async_events = pd->bdev->bd_disk->async_events; | ||
2894 | |||
2892 | add_disk(disk); | 2895 | add_disk(disk); |
2893 | 2896 | ||
2894 | pkt_sysfs_dev_new(pd); | 2897 | pkt_sysfs_dev_new(pd); |