linux-stable/drivers/mtd
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
..
chips Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2010-10-30 12:35:11 +01:00
devices block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
lpddr mtd: change struct flchip_shared spinlock locking into mutex 2010-08-06 09:22:16 +01:00
maps Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2010-10-30 12:35:11 +01:00
nand Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
onenand mtd: OneNAND: S5PC110: Fix double call suspend & resume function 2010-10-25 01:36:14 +01:00
tests mtd: tests: return -1 if verify failed 2010-08-02 09:06:20 +01:00
ubi Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6 2010-10-22 16:34:23 -07:00
afs.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ar7part.c [MTD] mtdpart: Make all partition parsers return allocated array 2009-03-20 18:55:17 +00:00
cmdlinepart.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ftl.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
inftlcore.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
inftlmount.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
Kconfig mtd: update description on sm_ftl 2010-08-06 09:21:40 +01:00
Makefile Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
mtd_blkdevs.c mtd: Remove redundant mutex from mtd_blkdevs.c 2010-10-30 12:39:21 +01:00
mtdblock.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdblock_ro.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdchar.c Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
mtdconcat.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdcore.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
mtdcore.h mtd: Replace static array of devices with an idr structure 2010-02-25 11:55:14 +00:00
mtdoops.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
mtdpart.c mtd: prepare partition add and del functions for ioctl requests 2010-10-25 00:47:37 +01:00
mtdsuper.c convert get_sb_mtd() users to ->mount() 2010-10-29 04:16:26 -04:00
nftlcore.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
nftlmount.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
ofpart.c mtd: Fix endianness issues from device tree 2010-10-25 00:55:56 +01:00
redboot.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
rfd_ftl.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
sm_ftl.c bitops: rename for_each_bit() to for_each_set_bit(): mtd 2010-04-08 09:42:41 +01:00
sm_ftl.h mtd: sm_ftl: cosmetic, use bool when possible 2010-10-25 01:33:08 +01:00
ssfdc.c mtd: Update copyright notices 2010-08-08 20:58:20 +01:00