1. 06 1月, 2011 1 次提交
  2. 02 12月, 2010 1 次提交
  3. 18 11月, 2010 1 次提交
  4. 17 11月, 2010 2 次提交
    • J
      cciss: fix build for PROC_FS disabled · bbe425cd
      Jens Axboe 提交于
      The recent patch to fix the removal of a non-existing proc
      directory introduced this build problem for !CONFIG_PROC_FS:
      
      drivers/block/cciss.c:4929: error: 'proc_cciss' undeclared (first use in this function)
      
      Fix it by moving proc_cciss outside of the CONFIG_PROC_FS scope.
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      bbe425cd
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  5. 16 11月, 2010 1 次提交
    • V
      block: fix amiga and atari floppy driver compile warning · 3e9bb2a0
      Vivek Goyal 提交于
      Geert, my crosstool don't produce warning below. I guess this has to do
      something with compiler version.
      
      - Geert noticed following warning during compilation.
      
        drivers/block/amiflop.c:1344: warning: ‘rq’ may be used uninitialized in
        this function
        drivers/block/ataflop.c:1402: warning: ‘rq’ may be used uninitialized in
        this function
      
      - Initialize rq to NULL to fix the warning. If we can't find a suitable request
        to dispatch, this function should return NULL instead of a possibly garbage
        pointer.
      
      - Cross compile tested only. Don't have hardware to test it.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      3e9bb2a0
  6. 10 11月, 2010 3 次提交
    • C
      block: remove REQ_HARDBARRIER · 02e031cb
      Christoph Hellwig 提交于
      REQ_HARDBARRIER is dead now, so remove the leftovers.  What's left
      at this point is:
      
       - various checks inside the block layer.
       - sanity checks in bio based drivers.
       - now unused bio_empty_barrier helper.
       - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while,
         but Xen really needs to sort out it's barrier situaton.
       - setting of ordered tags in uas - dead code copied from old scsi
         drivers.
       - scsi different retry for barriers - it's dead and should have been
         removed when flushes were converted to FS requests.
       - blktrace handling of barriers - removed.  Someone who knows blktrace
         better should add support for REQ_FLUSH and REQ_FUA, though.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      02e031cb
    • M
      block: read i_size with i_size_read() · 77304d2a
      Mike Snitzer 提交于
      Convert direct reads of an inode's i_size to using i_size_read().
      
      i_size_{read,write} use a seqcount to protect reads from accessing
      incomple writes.  Concurrent i_size_write()s require mutual exclussion
      to protect the seqcount that is used by i_size_{read,write}.  But
      i_size_read() callers do not need to use additional locking.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Acked-by: NLars Ellenberg <lars.ellenberg@linbit.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      77304d2a
    • J
      cciss: fix proc warning on attempt to remove non-existant directory · 90fdb0b9
      Jens Axboe 提交于
      Randy reports that he gets the following stack trace when
      removing the cciss module:
      
      [  109.164277] Pid: 3463, comm: rmmod Not tainted 2.6.37-rc1 #7
      [  109.164280] Call Trace:
      [  109.164292]  [<ffffffff8107eb8d>] warn_slowpath_common+0xc6/0xf3
      [  109.164299]  [<ffffffff8107ecaa>] warn_slowpath_fmt+0x5b/0x6b
      [  109.164307]  [<ffffffff8155175b>] ? _raw_spin_unlock+0x40/0x4b
      [  109.164313]  [<ffffffff8123dd1e>] remove_proc_entry+0x156/0x35e
      [  109.164320]  [<ffffffff812cd91b>] ? do_raw_spin_unlock+0xff/0x10f
      [  109.164327]  [<ffffffff8113823d>] ? trace_hardirqs_on+0x10/0x4a
      [  109.164333]  [<ffffffff8155162d>] ? _raw_spin_unlock_irq+0x4c/0x7b
      [  109.164339]  [<ffffffff8154d4d1>] ? wait_for_common+0x145/0x15e
      [  109.164345]  [<ffffffff81075337>] ? default_wake_function+0x0/0x22
      [  109.164357]  [<ffffffffa0615a8f>] cciss_cleanup+0xa9/0xc7 [cciss]
      [  109.164365]  [<ffffffff810d3cb0>] sys_delete_module+0x2d6/0x368
      [  109.164371]  [<ffffffff8155036b>] ? lockdep_sys_exit_thunk+0x35/0x67
      [  109.164377]  [<ffffffff810fdfaf>] ? audit_syscall_entry+0x172/0x1a5
      [  109.164383]  [<ffffffff815502f5>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [  109.164389]  [<ffffffff8100ea72>] system_call_fastpath+0x16/0x1b
      [  109.164394] ---[ end trace 88e8568246ed0b1d ]---
      
      which will happen if you don't actually have an HP CISS adapter,
      since it'll do an uncondional removal of a proc directory it
      never attempted to create in that case.
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      90fdb0b9
  7. 06 11月, 2010 2 次提交
    • V
      floppy: fix another use-after-free · d017bf6b
      Vivek Goyal 提交于
      While scanning the floopy code due to c093ee4f ("floppy: fix
      use-after-free in module load failure path"), I found one more instance
      of trying to access disk->queue pointer after doing put_disk() on
      gendisk.  For some reason , floppy moule still loads/unloads fine.  The
      object is probably still around with right pointer values.
      
       o There seems to be one more instance of trying to cleanup the request
         queue after we have called put_disk() on associated gendisk.
      
       o This fix is more out of code inspection.  Even without this fix for
         some reason I am able to load/unload floppy module without any
         issues.
      
       o Floppy module loads/unloads fine after the fix.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d017bf6b
    • L
      floppy: fix use-after-free in module load failure path · c093ee4f
      Linus Torvalds 提交于
      Commit 48821184 ("floppy: switch to one queue per drive instead of
      sharing a queue") introduced a use-after-free.  We do "put_disk()" on
      the disk device _before_ we then clean up the queue associated with that
      disk.
      
      Move the put_disk() down to avoid dereferencing a free'd data structure.
      
      Cc: Jens Axboe <jaxboe@fusionio.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Reported-and-tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c093ee4f
  8. 03 11月, 2010 1 次提交
  9. 02 11月, 2010 3 次提交
  10. 28 10月, 2010 7 次提交
  11. 27 10月, 2010 1 次提交
  12. 24 10月, 2010 5 次提交
  13. 23 10月, 2010 4 次提交
  14. 22 10月, 2010 8 次提交