mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
Btrfs: skip readonly root for snapshot-aware defragment
Btrfs send is assuming readonly root won't change, let's skip readonly root. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
This commit is contained in:
parent
850a8cdffe
commit
bcbba5e659
1 changed files with 5 additions and 0 deletions
|
@ -2240,6 +2240,11 @@ static noinline int relink_extent_backref(struct btrfs_path *path,
|
|||
return PTR_ERR(root);
|
||||
}
|
||||
|
||||
if (btrfs_root_readonly(root)) {
|
||||
srcu_read_unlock(&fs_info->subvol_srcu, index);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* step 2: get inode */
|
||||
key.objectid = backref->inum;
|
||||
key.type = BTRFS_INODE_ITEM_KEY;
|
||||
|
|
Loading…
Reference in a new issue