projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
850a8cd
)
Btrfs: skip readonly root for snapshot-aware defragment
author
Wang Shilong
<wangsl.fnst@cn.fujitsu.com>
Sat, 8 Feb 2014 15:46:35 +0000
(23:46 +0800)
committer
Josef Bacik
<jbacik@fb.com>
Mon, 10 Mar 2014 19:16:34 +0000
(15:16 -0400)
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>
fs/btrfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index
5b89250
..
b88f622
100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-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;