aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/inode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c5c27d5457cc..3d29505971fe 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6359,14 +6359,19 @@ fail_dir_item:
6359 err = btrfs_del_root_ref(trans, key.objectid, 6359 err = btrfs_del_root_ref(trans, key.objectid,
6360 root->root_key.objectid, parent_ino, 6360 root->root_key.objectid, parent_ino,
6361 &local_index, name, name_len); 6361 &local_index, name, name_len);
6362 6362 if (err)
6363 btrfs_abort_transaction(trans, err);
6363 } else if (add_backref) { 6364 } else if (add_backref) {
6364 u64 local_index; 6365 u64 local_index;
6365 int err; 6366 int err;
6366 6367
6367 err = btrfs_del_inode_ref(trans, root, name, name_len, 6368 err = btrfs_del_inode_ref(trans, root, name, name_len,
6368 ino, parent_ino, &local_index); 6369 ino, parent_ino, &local_index);
6370 if (err)
6371 btrfs_abort_transaction(trans, err);
6369 } 6372 }
6373
6374 /* Return the original error code */
6370 return ret; 6375 return ret;
6371} 6376}
6372 6377