aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/orphan.c
diff options
context:
space:
mode:
authorGravatar Jeff Mahoney <jeffm@suse.com> 2012-03-12 16:03:00 +0100
committerGravatar David Sterba <dsterba@suse.cz> 2012-03-22 11:52:54 +0100
commit79787eaab46121d4713ed03c8fc63b9ec3eaec76 (patch)
treeee6b17d0811ee54ab74a03aa4e0bb92769d2f12a /fs/btrfs/orphan.c
parentbtrfs: enhance transaction abort infrastructure (diff)
downloadlinux-79787eaab46121d4713ed03c8fc63b9ec3eaec76.tar.gz
linux-79787eaab46121d4713ed03c8fc63b9ec3eaec76.tar.bz2
linux-79787eaab46121d4713ed03c8fc63b9ec3eaec76.zip
btrfs: replace many BUG_ONs with proper error handling
btrfs currently handles most errors with BUG_ON. This patch is a work-in- progress but aims to handle most errors other than internal logic errors and ENOMEM more gracefully. This iteration prevents most crashes but can run into lockups with the page lock on occasion when the timing "works out." Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/orphan.c')
-rw-r--r--fs/btrfs/orphan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/orphan.c b/fs/btrfs/orphan.c
index f8be250963a0..24cad1695af7 100644
--- a/fs/btrfs/orphan.c
+++ b/fs/btrfs/orphan.c
@@ -58,7 +58,7 @@ int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
if (ret < 0)
goto out;
- if (ret) {
+ if (ret) { /* JDM: Really? */
ret = -ENOENT;
goto out;
}