Btrfs: don't BUG_ON() if we get an error walking backrefs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:03 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4724b106b9b8e8b802ca6f6d8a2f74feb8a3c375
Commit:     4724b106b9b8e8b802ca6f6d8a2f74feb8a3c375
Parent:     54563d41a58be77e9bd9ef7af1ea4026cf0e7e07
Author:     Josef Bacik <jbacik at fusionio.com>
AuthorDate: Tue Nov 5 11:11:40 2013 -0500
Committer:  Chris Mason <chris.mason at fusionio.com>
CommitDate: Wed Nov 20 20:41:16 2013 -0500

    Btrfs: don't BUG_ON() if we get an error walking backrefs
    
    We can just return false for this so we stop doing the snapshot aware defrag
    stuff.  Thanks,
    
    Signed-off-by: Josef Bacik <jbacik at fusionio.com>
    Signed-off-by: Chris Mason <chris.mason at fusionio.com>
---
 fs/btrfs/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index da8d2f6..fd67b34 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2129,7 +2129,8 @@ static noinline bool record_extent_backrefs(struct btrfs_path *path,
 						  old->extent_offset, fs_info,
 						  path, record_one_backref,
 						  old);
-		BUG_ON(ret < 0 && ret != -ENOENT);
+		if (ret < 0 && ret != -ENOENT)
+			return false;
 
 		/* no backref to be processed for this extent */
 		if (!old->count) {



More information about the linux-mtd-cvs mailing list