Skip to content

Commit 67d584e

Browse files
committed
Merge tag 'for-5.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: "Two fixes. The first is a regression: when dropping some incompat bits the conditions were reversed. The other is a fix for rename whiteout potentially leaving stack memory linked to a list" * tag 'for-5.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix removal of raid[56|1c34} incompat flags after removing block group btrfs: fix log context list corruption after rename whiteout error
2 parents b3c03db + d8e6fd5 commit 67d584e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

fs/btrfs/block-group.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,9 @@ static void clear_incompat_bg_bits(struct btrfs_fs_info *fs_info, u64 flags)
856856
found_raid1c34 = true;
857857
up_read(&sinfo->groups_sem);
858858
}
859-
if (found_raid56)
859+
if (!found_raid56)
860860
btrfs_clear_fs_incompat(fs_info, RAID56);
861-
if (found_raid1c34)
861+
if (!found_raid1c34)
862862
btrfs_clear_fs_incompat(fs_info, RAID1C34);
863863
}
864864
}

fs/btrfs/inode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9496,6 +9496,10 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
94969496
ret = btrfs_sync_log(trans, BTRFS_I(old_inode)->root, &ctx);
94979497
if (ret)
94989498
commit_transaction = true;
9499+
} else if (sync_log) {
9500+
mutex_lock(&root->log_mutex);
9501+
list_del(&ctx.list);
9502+
mutex_unlock(&root->log_mutex);
94999503
}
95009504
if (commit_transaction) {
95019505
ret = btrfs_commit_transaction(trans);

0 commit comments

Comments
 (0)