linux/drivers/block
Tejun Heo d4d7762995 block: clean up blkdev_get() wrappers and their users
After recent blkdev_get() modifications, open_by_devnum() and
open_bdev_exclusive() are simple wrappers around blkdev_get().
Replace them with blkdev_get_by_dev() and blkdev_get_by_path().

blkdev_get_by_dev() is identical to open_by_devnum().
blkdev_get_by_path() is slightly different in that it doesn't
automatically add %FMODE_EXCL to @mode.

All users are converted.  Most conversions are mechanical and don't
introduce any behavior difference.  There are several exceptions.

* btrfs now sets FMODE_EXCL in btrfs_device->mode, so there's no
  reason to OR it explicitly on blkdev_put().

* gfs2, nilfs2 and the generic mount_bdev() now set FMODE_EXCL in
  sb->s_mode.

* With the above changes, sb->s_mode now always should contain
  FMODE_EXCL.  WARN_ON_ONCE() added to kill_block_super() to detect
  errors.

The new blkdev_get_*() functions are with proper docbook comments.
While at it, add function description to blkdev_get() too.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Joern Engel <joern@lazybastard.org>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jan Kara <jack@suse.cz>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
Cc: reiserfs-devel@vger.kernel.org
Cc: xfs-masters@oss.sgi.com
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
2010-11-13 11:55:18 +01:00
..
aoe drivers/block/aoe/aoeblk.c: ratelimit a warning printk 2010-10-28 06:15:26 -06:00
drbd block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
paride Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
amiflop.c Merge branch 'for-2.6.37/drivers' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:03:12 -07:00
ataflop.c Merge branch 'for-2.6.37/drivers' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:03:12 -07:00
brd.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
cciss_cmd.h cciss: fix hard reset code. 2010-08-07 18:52:30 +02:00
cciss_scsi.c cciss: change printks to dev_warn, etc. 2010-08-07 18:52:30 +02:00
cciss_scsi.h cciss: remove C99-style comments 2010-02-22 13:44:45 +01:00
cciss.c cciss: remove overlapping PCI IDs 2010-10-28 06:33:27 -06:00
cciss.h cciss: use consistent variable names 2010-08-07 18:52:30 +02:00
cpqarray.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
cpqarray.h
cryptoloop.c drivers: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:32 -04:00
DAC960.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
DAC960.h Fix DAC960 driver on machines which don't support 64-bit DMA 2007-09-11 17:21:19 -07:00
floppy.c floppy: fix another use-after-free 2010-11-06 07:49:56 -07:00
hd.c block: remove wrappers for request type/flags 2010-08-07 18:17:56 +02:00
ida_cmd.h
ida_ioctl.h
Kconfig rbd: introduce rados block device (rbd), based on libceph 2010-10-20 15:38:13 -07:00
loop.c loop: Properly clear sysfs in autoclear mode 2010-10-27 19:51:30 -06:00
Makefile rbd: introduce rados block device (rbd), based on libceph 2010-10-20 15:38:13 -07:00
mg_disk.c block: switch s390 tape_block and mg_disk to elevator_change() 2010-08-23 14:02:44 +02:00
nbd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
osdblk.c block: remove spurious uses of REQ_HARDBARRIER 2010-09-10 12:35:36 +02:00
pktcdvd.c block: make blkdev_get/put() handle exclusive access 2010-11-13 11:55:17 +01:00
ps3disk.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
ps3vram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rbd_types.h rbd: introduce rados block device (rbd), based on libceph 2010-10-20 15:38:13 -07:00
rbd.c rbd: passing wrong variable to bvec_kunmap_irq() 2010-10-20 15:38:25 -07:00
smart1,2.h
sunvdc.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
swim_asm.S m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
swim.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
swim3.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
sx8.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
ub.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2010-10-22 20:30:48 -07:00
umem.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
umem.h drivers/block/umem: trim trailing whitespace 2007-10-10 09:25:59 +02:00
viodasd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
virtio_blk.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
xd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
xd.h [PATCH] switch xd 2008-10-21 07:48:11 -04:00
xen-blkfront.c Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2010-10-28 17:11:17 -07:00
xsysace.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-10-25 08:19:14 -07:00
z2ram.c drivers/block/z2ram.c: correct printing of sector_t 2010-10-28 06:15:26 -06:00