diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-07-24 12:17:14 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:05 -0400 |
commit | 7b1287662304c3cb05cb38f5e3e2d69f386e8f10 (patch) | |
tree | bb589bfc3854f801b4098f2f2140e42a2f9e8071 /fs/btrfs/ctree.c | |
parent | 33268eaf0b3db5e2bd12c0ada81a8e8f87a46d68 (diff) | |
download | linux-7b1287662304c3cb05cb38f5e3e2d69f386e8f10.tar.gz linux-7b1287662304c3cb05cb38f5e3e2d69f386e8f10.tar.bz2 linux-7b1287662304c3cb05cb38f5e3e2d69f386e8f10.zip |
Btrfs: Create orphan inode records to prevent lost files after a crash
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index cdc713062b03..f2a94999c371 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2622,7 +2622,7 @@ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, total_data += data_size[i]; } - total_size = total_data + (nr - 1) * sizeof(struct btrfs_item); + total_size = total_data + (nr * sizeof(struct btrfs_item)); ret = btrfs_search_slot(trans, root, cpu_key, path, total_size, 1); if (ret == 0) { return -EEXIST; |