aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/vmxnet3/vmxnet3_ethtool.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-04-29 10:15:14 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 15:13:33 -0700
commit9f5cc5c89537184cf45a7e069330c85428a7fc09 (patch)
treeee9ab2f23450bd2e8308a89a7d3c915ac5bf7208 /drivers/net/vmxnet3/vmxnet3_ethtool.c
parentb106c56573f9656e3cf863781dd5c0895d0f120d (diff)
cdrom: always check_disk_change() on open
commit bf2253a6f00e8fea5b026e471e9f0d0a1b3621f2 upstream. cdrom_open() called check_disk_change() after the rest of open path succeeded which leads to the following bizarre behavior. * After media change, if the device opened without O_NONBLOCK, open_for_data() naturally fails with -ENOMEDIA and check_disk_change() is never called. The media is known to be gone and the open failure makes it obvious to the userland but device invalidation never happens. * But if the device is opened with O_NONBLOCK, all the checks are bypassed and cdrom_open() doesn't notice that the media is not there and check_disk_change() is called and invalidation happens. There's nothing to be gained by avoiding calling check_disk_change() on open failure. Common cases end up calling check_disk_change() anyway. All we get is inconsistent behavior. Fix it by moving check_disk_change() invocation to the top of cdrom_open() so that it always gets called regardless of how the rest of open proceeds. Stable: 2.6.38 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Amit Shah <amit.shah@redhat.com> Tested-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_ethtool.c')
0 files changed, 0 insertions, 0 deletions