Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[sfrench/cifs-2.6.git] / fs / btrfs / root-tree.c
index 460db0cb2d0734db78c52a934620953b5677de23..95bcc3cce78f80e4096d470d97d41f7b6df89329 100644 (file)
@@ -151,7 +151,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
        }
 
        if (ret != 0) {
-               btrfs_print_leaf(fs_info, path->nodes[0]);
+               btrfs_print_leaf(path->nodes[0]);
                btrfs_crit(fs_info, "unable to update root key %llu %u %llu",
                           key->objectid, key->type, key->offset);
                BUG_ON(1);
@@ -228,7 +228,7 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
        int ret;
        bool can_recover = true;
 
-       if (fs_info->sb->s_flags & MS_RDONLY)
+       if (sb_rdonly(fs_info->sb))
                can_recover = false;
 
        path = btrfs_alloc_path();
@@ -335,10 +335,11 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
        return err;
 }
 
-/* drop the root item for 'key' from 'root' */
-int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
-                  const struct btrfs_key *key)
+/* drop the root item for 'key' from the tree root */
+int btrfs_del_root(struct btrfs_trans_handle *trans,
+                  struct btrfs_fs_info *fs_info, const struct btrfs_key *key)
 {
+       struct btrfs_root *root = fs_info->tree_root;
        struct btrfs_path *path;
        int ret;