linux/fs
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
..
9p
adfs
affs
afs convert afs 2010-10-29 04:17:13 -04:00
autofs4
befs
bfs
btrfs block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
cachefiles
ceph convert ceph 2010-10-29 04:17:18 -04:00
cifs cifs: fix a memleak in cifs_setattr_nounix() 2010-11-09 15:17:53 +00:00
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 2010-10-29 14:15:12 -07:00
efs
exofs
exportfs
ext2
ext3 block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
ext4 block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
fat
freevxfs
fscache
fuse
gfs2 block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
hfs
hfsplus
hostfs
hpfs Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-31 20:40:24 -04:00
hppfs
hugetlbfs
isofs
jbd
jbd2 jbd2: Convert jbd2_slab_create_sem to mutex 2010-10-30 12:12:50 +02:00
jffs2 Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
jfs block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
lockd
logfs block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
minix
ncpfs
nfs locks: let the caller free file_lock on ->setlease failure 2010-10-31 06:35:15 -07:00
nfs_common
nfsd locks: let the caller free file_lock on ->setlease failure 2010-10-31 06:35:15 -07:00
nilfs2 block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
nls
notify make fanotify_read() restartable across signals 2010-10-30 14:07:35 -04:00
ntfs
ocfs2 block: make blkdev_get/put() handle exclusive access 2010-11-13 11:55:17 +01:00
omfs
openpromfs sparc: fix openpromfs compile 2010-11-08 14:29:39 -08:00
partitions block: make blkdev_get/put() handle exclusive access 2010-11-13 11:55:17 +01:00
proc
qnx4
quota
ramfs
reiserfs block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
romfs
squashfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus 2010-10-29 08:48:58 -07:00
sysfs
sysv
ubifs
udf
ufs
xfs block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
buffer.c
char_dev.c
compat.c fs/compat.c: fix build on MIPS/s390 2010-10-30 08:19:35 -07:00
compat_binfmt_elf.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2010-10-30 09:05:48 -07:00
fs_struct.c
generic_acl.c
inode.c
internal.h braino in internal.h 2010-10-29 05:49:13 -04:00
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c locks: remove fl_copy_lock lock_manager operation 2010-10-31 06:35:15 -07:00
Makefile
mbcache.c mbcache: Limit the maximum number of cache entries 2010-08-18 06:24:41 -04:00
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
read_write.c readv/writev: do the same MAX_RW_COUNT truncation that read/write does 2010-10-29 10:36:49 -07:00
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c block: clean up blkdev_get() wrappers and their users 2010-11-13 11:55:18 +01:00
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c