tmp_suning_uos_patched/fs/btrfs
Josef Bacik 1b1d1f6625 Btrfs: fail to mount if we have problems reading the block groups
We don't actually check the return value of btrfs_read_block_groups, so we can
possibly succeed to mount, but then fail to say read the superblock xattr for
selinux which will cause the vfs code to deactivate the super.

This is a problem because in find_free_extent we just assume that we
will find the right space_info for the allocation we want.  But if we
failed to read the block groups, we won't have setup any space_info's,
and we'll hit a NULL pointer deref in find_free_extent.

This patch fixes that problem by checking the return value of
btrfs_read_block_groups, and failing out properly.  I've also added a
check in find_free_extent so if for some reason we don't find an
appropriate space_info, we just return -ENOSPC.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-03-30 21:19:09 -04:00
..
acl.c Btrfs: fix a memory leak in btrfs_init_acl 2010-01-28 16:20:39 -05:00
async-thread.c Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
async-thread.h Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
btrfs_inode.h Btrfs: add new defrag-range ioctl. 2010-03-15 11:00:10 -04:00
compat.h
compression.c Btrfs: fix gfp flags masking in the compression code 2010-03-15 11:05:57 -04:00
compression.h
ctree.c Btrfs: Fix per root used space accounting 2009-12-17 12:33:35 -05:00
ctree.h btrfs: use memparse 2010-03-15 11:00:14 -04:00
delayed-ref.c
delayed-ref.h
dir-item.c Btrfs: Pass transaction handle to security and ACL initialization functions 2009-12-17 12:33:34 -05:00
disk-io.c Btrfs: fail to mount if we have problems reading the block groups 2010-03-30 21:19:09 -04:00
disk-io.h
export.c Btrfs: change how we mount subvolumes 2010-03-15 10:58:13 -04:00
export.h
extent_io.c Btrfs: cache the extent state everywhere we possibly can V2 2010-03-15 11:00:13 -04:00
extent_io.h Btrfs: cache the extent state everywhere we possibly can V2 2010-03-15 11:00:13 -04:00
extent_map.c Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL 2010-03-08 16:26:50 -05:00
extent_map.h Btrfs: search for an allocation hint while filling file COW 2009-09-18 16:08:52 -04:00
extent-tree.c Btrfs: fail to mount if we have problems reading the block groups 2010-03-30 21:19:09 -04:00
file-item.c
file.c Btrfs: cache the extent state everywhere we possibly can V2 2010-03-15 11:00:13 -04:00
free-space-cache.c Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL 2010-03-08 16:26:50 -05:00
free-space-cache.h
hash.h
inode-item.c Btrfs: check size of inode backref before adding hardlink 2009-09-24 09:17:31 -04:00
inode-map.c Btrfs: do not reuse objectid of deleted snapshot/subvol 2009-09-21 15:56:00 -04:00
inode.c Btrfs: cache the extent state everywhere we possibly can V2 2010-03-15 11:00:13 -04:00
ioctl.c Btrfs: check btrfs_get_extent return for IS_ERR() 2010-03-30 21:19:09 -04:00
ioctl.h Btrfs: use __u64 types in ioctl.h 2010-03-16 14:24:27 -04:00
Kconfig
locking.c
locking.h
Makefile
ordered-data.c Btrfs: cache ordered extent when completing io 2010-03-15 11:00:13 -04:00
ordered-data.h Btrfs: cache ordered extent when completing io 2010-03-15 11:00:13 -04:00
orphan.c Btrfs: change how subvolumes are organized 2009-09-21 15:56:00 -04:00
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL 2010-03-08 16:26:50 -05:00
relocation.c Btrfs: cache the extent state everywhere we possibly can V2 2010-03-15 11:00:13 -04:00
root-tree.c Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root 2009-11-11 14:20:18 -05:00
struct-funcs.c
super.c btrfs: use memparse 2010-03-15 11:00:14 -04:00
sysfs.c
transaction.c Btrfs: Remove unnecessary finish_wait() in wait_current_trans() 2010-03-30 21:19:08 -04:00
transaction.h Btrfs: Avoid superfluous tree-log writeout 2009-12-15 21:24:25 -05:00
tree-defrag.c
tree-log.c Btrfs: change how we mount subvolumes 2010-03-15 10:58:13 -04:00
tree-log.h Btrfs: avoid tree log commit when there are no changes 2009-10-13 13:35:12 -04:00
version.h
version.sh
volumes.c Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() 2010-03-30 21:19:09 -04:00
volumes.h Btrfs: make balance code choose more wisely when relocating 2009-09-21 19:23:48 -04:00
xattr.c Btrfs: Pass transaction handle to security and ACL initialization functions 2009-12-17 12:33:34 -05:00
xattr.h Btrfs: Pass transaction handle to security and ACL initialization functions 2009-12-17 12:33:34 -05:00
zlib.c