Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jun 2013 05:34:14 +0000 (22:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jun 2013 05:34:14 +0000 (22:34 -0700)
Pull btrfs fixes from Chris Mason:
 "This is an assortment of crash fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: stop all workers before cleaning up roots
  Btrfs: fix use-after-free bug during umount
  Btrfs: init relocate extent_io_tree with a mapping
  btrfs: Drop inode if inode root is NULL
  Btrfs: don't delete fs_roots until after we cleanup the transaction

1  2 
fs/btrfs/inode.c

diff --combined fs/btrfs/inode.c
index af978f7682b3441282b0f54e62a60b7534d51203,c931a4dbd03136ca3de74ab1ad9371b6fbdf23f4..17f3064b4a3ebf7b65188be58b66713670f00ca9
@@@ -32,7 -32,6 +32,7 @@@
  #include <linux/writeback.h>
  #include <linux/statfs.h>
  #include <linux/compat.h>
 +#include <linux/aio.h>
  #include <linux/bit_spinlock.h>
  #include <linux/xattr.h>
  #include <linux/posix_acl.h>
@@@ -8012,6 -8011,9 +8012,9 @@@ int btrfs_drop_inode(struct inode *inod
  {
        struct btrfs_root *root = BTRFS_I(inode)->root;
  
+       if (root == NULL)
+               return 1;
        /* the snap/subvol tree is on deleting */
        if (btrfs_root_refs(&root->root_item) == 0 &&
            root != root->fs_info->tree_root)