Skip to contentSkip to conversation

Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting

PATCH In review Ilya Dryomov 2 participants 2 messages Jun 22, 2012 – Jun 25, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting

There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in. Bail out with EINVAL.

---
 fs/btrfs/disk-io.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +2 -2
index f06db81..77872da 100644
@@ -2461,8 +2461,8 @@ retry_root_backup:
 
 	if (!(sb->s_flags & MS_RDONLY)) {
 		ret = btrfs_cleanup_fs_roots(fs_info);
-		if (ret) {
-			}
+		if (ret)
+			goto fail_trans_kthread;
 
 		ret = btrfs_recover_relocation(tree_root);
 		if (ret < 0) {
Signature · 1 line
1.7.9.1
#1 lore raw
Quoted 14 lines · Ilya Dryomov

There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in. Bail out with EINVAL.

---
 fs/btrfs/disk-io.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +0 -0
index f06db81..77872da 100644

fs/btrfs/disk-io.c retry_root_backup: · line 2465

Quoted 7 lines
fs/btrfs/disk-io.c +2 -2
@@ -2461,8 +2461,8 @@ retry_root_backup:
 
 	if (!(sb->s_flags & MS_RDONLY)) {
 		ret = btrfs_cleanup_fs_roots(fs_info);
-		if (ret) {
-			}
+		if (ret)
+			goto fail_trans_kthread;

Oh, right of course. Thanks.

david