Merge tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jan 2018 21:02:46 +0000 (13:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jan 2018 21:02:46 +0000 (13:02 -0800)
Pull btrfs fixes from David Sterba:
 "We have two more fixes for 4.15, both aimed for stable.

  The leak fix is obvious, the second patch fixes a bug revealed by the
  refcount API, when it behaves differently than previous atomic_t and
  reports refs going from 0 to 1 in one case"

* tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes
  btrfs: Fix flush bio leak

1  2 
fs/btrfs/volumes.c

diff --combined fs/btrfs/volumes.c
index 49810b70afd3941721246497d94c754ec2120619,94d28f54983735adb1d62b7d1496a263df30fef7..a256842875017b386a2a349f734f5feff7391484
@@@ -237,7 -237,6 +237,6 @@@ static struct btrfs_device *__alloc_dev
                kfree(dev);
                return ERR_PTR(-ENOMEM);
        }
-       bio_get(dev->flush_bio);
  
        INIT_LIST_HEAD(&dev->dev_list);
        INIT_LIST_HEAD(&dev->dev_alloc_list);
@@@ -2395,7 -2394,7 +2394,7 @@@ int btrfs_init_new_device(struct btrfs_
        set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE);
  
        if (seeding_dev) {
 -              sb->s_flags &= ~MS_RDONLY;
 +              sb->s_flags &= ~SB_RDONLY;
                ret = btrfs_prepare_sprout(fs_info);
                if (ret) {
                        btrfs_abort_transaction(trans, ret);
@@@ -2508,7 -2507,7 +2507,7 @@@ error_sysfs
        btrfs_sysfs_rm_device_link(fs_info->fs_devices, device);
  error_trans:
        if (seeding_dev)
 -              sb->s_flags |= MS_RDONLY;
 +              sb->s_flags |= SB_RDONLY;
        if (trans)
                btrfs_end_transaction(trans);
        rcu_string_free(device->name);