diff options
author | Jiri Kosina <jkosina@suse.cz> | 2009-10-09 11:49:10 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-11-09 09:40:57 +0100 |
commit | e0c0978699a83f26f2341f7eedc1463b79e31aff (patch) | |
tree | 20bc35c264eef530f27dbb6529160d41a2f80959 /fs/qnx4/bitmap.c | |
parent | 7a7236e0f3f836439442e9161dd6d25fde7ca259 (diff) | |
download | op-kernel-dev-e0c0978699a83f26f2341f7eedc1463b79e31aff.zip op-kernel-dev-e0c0978699a83f26f2341f7eedc1463b79e31aff.tar.gz |
ataflop: remove buggy/commented-out IRQ disable from do_fd_request()
There is a nice gem in drivers/block/ataflop.c::do_fd_request()
void do_fd_request(struct request_queue * q)
{
unsigned long flags;
DPRINT(("do_fd_request for pid %d\n",current->pid));
while( fdc_busy ) sleep_on( &fdc_wait );
fdc_busy = 1;
stdma_lock(floppy_irq, NULL);
atari_disable_irq( IRQ_MFP_FDC );
local_save_flags(flags); /* The request function is called with ints
local_irq_disable(); * disabled... so must save the IPL for later */
redo_fd_request();
local_irq_restore(flags);
atari_enable_irq( IRQ_MFP_FDC );
}
If you look at the code long enough, you will notioce that the
local_irq_disable() call is actually commented out. This has been
introduced back in 2002 in [1], but as you can see, the same bug has been
there even before, with the sti() call being commented out in the very
same way :)
I am not familiar with the code myself at all, but I guess that the whole
stuff can just be removed. Why do we need save_flags/restore_flags at all,
without actually disabling the local IRQs afterwards? The
redo_fd_request() doesn't seem to do anything that would mess with flags
inconsistently.
[1] http://lkml.org/lkml/2002/12/27/58
Jens:
That does look odd. The comment is correct that the function is entered
with interrupts disabled (and the queue lock held). So I'd say your
patch looks fine, the whole save/restore business looks meaningless.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Diffstat (limited to 'fs/qnx4/bitmap.c')
0 files changed, 0 insertions, 0 deletions