linux/fs/btrfs
Ilya Dryomov 04d21a244f Btrfs: rework error handling in btrfs_mount()
Commits 6c41761f and 45ea6095 introduced the possibility of NULL pointer
dereference on error paths, also we would leave all devices busy and
leak fs_info with all sub-structures on error when trying to mount an
already mounted fs to a different directory.

Fix this by doing all allocations before trying to open any of the
devices, adjust error path for mount-already-mounted-fs case.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2011-11-09 22:53:39 +02:00
..
acl.c Btrfs: fix return value of btrfs_get_acl() 2011-10-20 18:10:47 +02:00
async-thread.c
async-thread.h
backref.c Btrfs: fix the new inspection ioctls for 32 bit compat 2011-11-06 03:08:49 -05:00
backref.h btrfs: added helper functions to iterate backrefs 2011-09-29 12:54:27 +02:00
btrfs_inode.h Btrfs: fix our reservations for updating an inode when completing io 2011-11-08 15:47:34 -05:00
compat.h
compression.c btrfs: separate superblock items out of fs_info 2011-11-06 03:04:01 -05:00
compression.h
ctree.c Btrfs: fix array bound checking 2011-10-20 18:10:41 +02:00
ctree.h Merge branch 'for-chris' of git://github.com/sensille/linux into integration 2011-11-06 03:05:08 -05:00
delayed-inode.c Btrfs: fix our reservations for updating an inode when completing io 2011-11-08 15:47:34 -05:00
delayed-inode.h
delayed-ref.c
delayed-ref.h
dir-item.c
disk-io.c Btrfs: close devices on all error paths in open_ctree() 2011-11-09 22:53:38 +02:00
disk-io.h Merge branch 'for-chris' of git://github.com/sensille/linux into integration 2011-11-06 03:05:08 -05:00
export.c
export.h
extent_io.c Merge git://git.jan-o-sch.net/btrfs-unstable into integration 2011-11-06 03:07:10 -05:00
extent_io.h Merge git://git.jan-o-sch.net/btrfs-unstable into integration 2011-11-06 03:07:10 -05:00
extent_map.c
extent_map.h
extent-tree.c Btrfs: fix our reservations for updating an inode when completing io 2011-11-08 15:47:34 -05:00
file-item.c btrfs: separate superblock items out of fs_info 2011-11-06 03:04:01 -05:00
file.c Btrfs: use the inode's mapping mask for allocating pages 2011-10-19 15:12:45 -04:00
free-space-cache.c Btrfs: use the global reserve when truncating the free space cache inode 2011-11-06 03:03:50 -05:00
free-space-cache.h
hash.h
inode-item.c
inode-map.c Btrfs: handle enospc accounting for free space inodes 2011-10-19 15:12:42 -04:00
inode-map.h
inode.c Btrfs: fix our reservations for updating an inode when completing io 2011-11-08 15:47:34 -05:00
ioctl.c Btrfs: fix the new inspection ioctls for 32 bit compat 2011-11-06 03:08:49 -05:00
ioctl.h Btrfs: fix the new inspection ioctls for 32 bit compat 2011-11-06 03:08:49 -05:00
Kconfig
locking.c
locking.h
lzo.c
Makefile Merge git://git.jan-o-sch.net/btrfs-unstable into integration 2011-11-06 03:07:10 -05:00
ordered-data.c
ordered-data.h
orphan.c
print-tree.c btrfs: fix oops on failure path 2011-10-20 18:10:50 +02:00
print-tree.h
reada.c Btrfs: rename btrfs_bio multi -> bbio for consistency 2011-11-06 03:11:21 -05:00
relocation.c btrfs: check file extent backref offset underflow 2011-10-20 18:10:31 +02:00
root-tree.c
scrub.c Btrfs: fix a potential btrfs_bio leak on scrub fixups 2011-11-06 03:11:29 -05:00
struct-funcs.c
super.c Btrfs: rework error handling in btrfs_mount() 2011-11-09 22:53:39 +02:00
sysfs.c
transaction.c Btrfs: fix race during transaction joins 2011-11-06 03:26:19 -05:00
transaction.h
tree-defrag.c
tree-log.c btrfs: separate superblock items out of fs_info 2011-11-06 03:04:01 -05:00
tree-log.h
version.h
volumes.c Merge git://git.jan-o-sch.net/btrfs-unstable into integration 2011-11-06 03:07:10 -05:00
volumes.h Merge git://git.jan-o-sch.net/btrfs-unstable into integration 2011-11-06 03:07:10 -05:00
xattr.c Btrfs: fix regression in re-setting a large xattr 2011-10-19 15:12:56 -04:00
xattr.h
zlib.c