diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-10-30 13:34:24 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-10-30 13:34:24 +0200 |
commit | 6418c96107a2b399848bb8cfc6e29f11ca74fb94 (patch) | |
tree | 38064798bde148760a7a3b555c0eb097bfd29fb2 | |
parent | Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed (diff) | |
download | linux-6418c96107a2b399848bb8cfc6e29f11ca74fb94.tar.xz linux-6418c96107a2b399848bb8cfc6e29f11ca74fb94.zip |
Btrfs: deal with errors from updating the tree log
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>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 609f3bbbd1ed..5132c9af888a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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) |