Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
"Two regression fixes and one fix for stable"

* tag 'for-4.17-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
Btrfs: send, fix missing truncate for inode with prealloc extent past eof
btrfs: Take trans lock before access running trans in check_delayed_ref
btrfs: Fix wrong first_key parameter in replace_path

+12 -1
+7
fs/btrfs/extent-tree.c
··· 3142 3142 struct rb_node *node; 3143 3143 int ret = 0; 3144 3144 3145 + spin_lock(&root->fs_info->trans_lock); 3145 3146 cur_trans = root->fs_info->running_transaction; 3147 + if (cur_trans) 3148 + refcount_inc(&cur_trans->use_count); 3149 + spin_unlock(&root->fs_info->trans_lock); 3146 3150 if (!cur_trans) 3147 3151 return 0; 3148 3152 ··· 3155 3151 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); 3156 3152 if (!head) { 3157 3153 spin_unlock(&delayed_refs->lock); 3154 + btrfs_put_transaction(cur_trans); 3158 3155 return 0; 3159 3156 } 3160 3157 ··· 3172 3167 mutex_lock(&head->mutex); 3173 3168 mutex_unlock(&head->mutex); 3174 3169 btrfs_put_delayed_ref_head(head); 3170 + btrfs_put_transaction(cur_trans); 3175 3171 return -EAGAIN; 3176 3172 } 3177 3173 spin_unlock(&delayed_refs->lock); ··· 3205 3199 } 3206 3200 spin_unlock(&head->lock); 3207 3201 mutex_unlock(&head->mutex); 3202 + btrfs_put_transaction(cur_trans); 3208 3203 return ret; 3209 3204 } 3210 3205
+1 -1
fs/btrfs/relocation.c
··· 1841 1841 old_bytenr = btrfs_node_blockptr(parent, slot); 1842 1842 blocksize = fs_info->nodesize; 1843 1843 old_ptr_gen = btrfs_node_ptr_generation(parent, slot); 1844 - btrfs_node_key_to_cpu(parent, &key, slot); 1844 + btrfs_node_key_to_cpu(parent, &first_key, slot); 1845 1845 1846 1846 if (level <= max_level) { 1847 1847 eb = path->nodes[level];
+4
fs/btrfs/send.c
··· 5236 5236 len = btrfs_file_extent_num_bytes(path->nodes[0], ei); 5237 5237 } 5238 5238 5239 + if (offset >= sctx->cur_inode_size) { 5240 + ret = 0; 5241 + goto out; 5242 + } 5239 5243 if (offset + len > sctx->cur_inode_size) 5240 5244 len = sctx->cur_inode_size - offset; 5241 5245 if (len == 0) {