Loading fs/btrfs/acl.c +7 −10 Original line number Diff line number Diff line Loading @@ -59,22 +59,19 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) if (!value) return ERR_PTR(-ENOMEM); size = __btrfs_getxattr(inode, name, value, size); } if (size > 0) { acl = posix_acl_from_xattr(value, size); if (IS_ERR(acl)) { kfree(value); return acl; } set_cached_acl(inode, type, acl); } kfree(value); } else if (size == -ENOENT || size == -ENODATA || size == 0) { /* FIXME, who returns -ENOENT? I think nobody */ acl = NULL; set_cached_acl(inode, type, acl); } else { acl = ERR_PTR(-EIO); } kfree(value); if (!IS_ERR(acl)) set_cached_acl(inode, type, acl); return acl; } Loading fs/btrfs/ctree.c +6 −4 Original line number Diff line number Diff line Loading @@ -902,9 +902,10 @@ static noinline int balance_level(struct btrfs_trans_handle *trans, orig_ptr = btrfs_node_blockptr(mid, orig_slot); if (level < BTRFS_MAX_LEVEL - 1) if (level < BTRFS_MAX_LEVEL - 1) { parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; } /* * deal with the case where there is only one pointer in the root Loading Loading @@ -1107,9 +1108,10 @@ static noinline int push_nodes_for_insert(struct btrfs_trans_handle *trans, mid = path->nodes[level]; WARN_ON(btrfs_header_generation(mid) != trans->transid); if (level < BTRFS_MAX_LEVEL - 1) if (level < BTRFS_MAX_LEVEL - 1) { parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; } if (!parent) return 1; Loading fs/btrfs/extent-tree.c +8 −1 Original line number Diff line number Diff line Loading @@ -4954,6 +4954,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, bool failed_cluster_refill = false; bool failed_alloc = false; bool use_cluster = true; bool have_caching_bg = false; u64 ideal_cache_percent = 0; u64 ideal_cache_offset = 0; Loading Loading @@ -5036,6 +5037,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, } } search: have_caching_bg = false; down_read(&space_info->groups_sem); list_for_each_entry(block_group, &space_info->block_groups[index], list) { Loading Loading @@ -5244,6 +5246,8 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, failed_alloc = true; goto have_block_group; } else if (!offset) { if (!cached) have_caching_bg = true; goto loop; } checks: Loading Loading @@ -5294,6 +5298,9 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, } up_read(&space_info->groups_sem); if (!ins->objectid && loop >= LOOP_CACHING_WAIT && have_caching_bg) goto search; if (!ins->objectid && ++index < BTRFS_NR_RAID_TYPES) goto search; Loading Loading @@ -7312,7 +7319,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, goto out; } inode = lookup_free_space_inode(root, block_group, path); inode = lookup_free_space_inode(tree_root, block_group, path); if (!IS_ERR(inode)) { ret = btrfs_orphan_add(trans, inode); BUG_ON(ret); Loading fs/btrfs/extent_io.c +1 −1 Original line number Diff line number Diff line Loading @@ -1107,7 +1107,7 @@ int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state **cached_state, gfp_t mask) { return set_extent_bit(tree, start, end, EXTENT_DELALLOC | EXTENT_DIRTY | EXTENT_UPTODATE, EXTENT_DELALLOC | EXTENT_UPTODATE, 0, NULL, cached_state, mask); } Loading fs/btrfs/inode.c +6 −3 Original line number Diff line number Diff line Loading @@ -393,7 +393,10 @@ static noinline int compress_file_range(struct inode *inode, (BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS))) { WARN_ON(pages); pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS); BUG_ON(!pages); if (!pages) { /* just bail out to the uncompressed code */ goto cont; } if (BTRFS_I(inode)->force_compress) compress_type = BTRFS_I(inode)->force_compress; Loading Loading @@ -424,6 +427,7 @@ static noinline int compress_file_range(struct inode *inode, will_compress = 1; } } cont: if (start == 0) { trans = btrfs_join_transaction(root); BUG_ON(IS_ERR(trans)); Loading Loading @@ -5773,8 +5777,7 @@ static void btrfs_endio_direct_write(struct bio *bio, int err) if (test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) { ret = btrfs_ordered_update_i_size(inode, 0, ordered); if (!ret) ret = btrfs_update_inode(trans, root, inode); err = ret; err = btrfs_update_inode(trans, root, inode); goto out; } Loading Loading
fs/btrfs/acl.c +7 −10 Original line number Diff line number Diff line Loading @@ -59,22 +59,19 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) if (!value) return ERR_PTR(-ENOMEM); size = __btrfs_getxattr(inode, name, value, size); } if (size > 0) { acl = posix_acl_from_xattr(value, size); if (IS_ERR(acl)) { kfree(value); return acl; } set_cached_acl(inode, type, acl); } kfree(value); } else if (size == -ENOENT || size == -ENODATA || size == 0) { /* FIXME, who returns -ENOENT? I think nobody */ acl = NULL; set_cached_acl(inode, type, acl); } else { acl = ERR_PTR(-EIO); } kfree(value); if (!IS_ERR(acl)) set_cached_acl(inode, type, acl); return acl; } Loading
fs/btrfs/ctree.c +6 −4 Original line number Diff line number Diff line Loading @@ -902,9 +902,10 @@ static noinline int balance_level(struct btrfs_trans_handle *trans, orig_ptr = btrfs_node_blockptr(mid, orig_slot); if (level < BTRFS_MAX_LEVEL - 1) if (level < BTRFS_MAX_LEVEL - 1) { parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; } /* * deal with the case where there is only one pointer in the root Loading Loading @@ -1107,9 +1108,10 @@ static noinline int push_nodes_for_insert(struct btrfs_trans_handle *trans, mid = path->nodes[level]; WARN_ON(btrfs_header_generation(mid) != trans->transid); if (level < BTRFS_MAX_LEVEL - 1) if (level < BTRFS_MAX_LEVEL - 1) { parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; } if (!parent) return 1; Loading
fs/btrfs/extent-tree.c +8 −1 Original line number Diff line number Diff line Loading @@ -4954,6 +4954,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, bool failed_cluster_refill = false; bool failed_alloc = false; bool use_cluster = true; bool have_caching_bg = false; u64 ideal_cache_percent = 0; u64 ideal_cache_offset = 0; Loading Loading @@ -5036,6 +5037,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, } } search: have_caching_bg = false; down_read(&space_info->groups_sem); list_for_each_entry(block_group, &space_info->block_groups[index], list) { Loading Loading @@ -5244,6 +5246,8 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, failed_alloc = true; goto have_block_group; } else if (!offset) { if (!cached) have_caching_bg = true; goto loop; } checks: Loading Loading @@ -5294,6 +5298,9 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, } up_read(&space_info->groups_sem); if (!ins->objectid && loop >= LOOP_CACHING_WAIT && have_caching_bg) goto search; if (!ins->objectid && ++index < BTRFS_NR_RAID_TYPES) goto search; Loading Loading @@ -7312,7 +7319,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, goto out; } inode = lookup_free_space_inode(root, block_group, path); inode = lookup_free_space_inode(tree_root, block_group, path); if (!IS_ERR(inode)) { ret = btrfs_orphan_add(trans, inode); BUG_ON(ret); Loading
fs/btrfs/extent_io.c +1 −1 Original line number Diff line number Diff line Loading @@ -1107,7 +1107,7 @@ int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state **cached_state, gfp_t mask) { return set_extent_bit(tree, start, end, EXTENT_DELALLOC | EXTENT_DIRTY | EXTENT_UPTODATE, EXTENT_DELALLOC | EXTENT_UPTODATE, 0, NULL, cached_state, mask); } Loading
fs/btrfs/inode.c +6 −3 Original line number Diff line number Diff line Loading @@ -393,7 +393,10 @@ static noinline int compress_file_range(struct inode *inode, (BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS))) { WARN_ON(pages); pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS); BUG_ON(!pages); if (!pages) { /* just bail out to the uncompressed code */ goto cont; } if (BTRFS_I(inode)->force_compress) compress_type = BTRFS_I(inode)->force_compress; Loading Loading @@ -424,6 +427,7 @@ static noinline int compress_file_range(struct inode *inode, will_compress = 1; } } cont: if (start == 0) { trans = btrfs_join_transaction(root); BUG_ON(IS_ERR(trans)); Loading Loading @@ -5773,8 +5777,7 @@ static void btrfs_endio_direct_write(struct bio *bio, int err) if (test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) { ret = btrfs_ordered_update_i_size(inode, 0, ordered); if (!ret) ret = btrfs_update_inode(trans, root, inode); err = ret; err = btrfs_update_inode(trans, root, inode); goto out; } Loading