Skip to content

Commit

Permalink
Btrfs: deal with errors from updating the tree log
Browse files Browse the repository at this point in the history
During unlink we remove any references to the inode from
the tree log.  It can return -ENOENT and other errors,
and this changes the unlink code to deal with it.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Oct 30, 2010
1 parent 4260f7c commit 6418c96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,8 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,

ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
dir, index);
BUG_ON(ret);
if (ret == -ENOENT)
ret = 0;
err:
btrfs_free_path(path);
if (ret)
Expand Down

0 comments on commit 6418c96

Please sign in to comment.