diff options
author | Jeff Mahoney <jeffm@suse.com> | 2012-03-12 11:03:00 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-03-22 06:52:54 -0400 |
commit | 79787eaab46121d4713ed03c8fc63b9ec3eaec76 (patch) | |
tree | ee6b17d0811ee54ab74a03aa4e0bb92769d2f12a /fs/btrfs/inode-item.c | |
parent | 49b25e0540904be0bf558b84475c69d72e4de66e (diff) |
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/inode-item.c')
-rw-r--r-- | fs/btrfs/inode-item.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c index c0792409bb6a..7ec58bd7c50d 100644 --- a/fs/btrfs/inode-item.c +++ b/fs/btrfs/inode-item.c | |||
@@ -135,6 +135,7 @@ out: | |||
135 | return ret; | 135 | return ret; |
136 | } | 136 | } |
137 | 137 | ||
138 | /* Will return 0, -ENOMEM, -EMLINK, or -EEXIST or anything from the CoW path */ | ||
138 | int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, | 139 | int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, |
139 | struct btrfs_root *root, | 140 | struct btrfs_root *root, |
140 | const char *name, int name_len, | 141 | const char *name, int name_len, |