btrfs: make code reachable in btrfs_insert_some_items()
PATCH 1/1 btrfs: make code reachable in btrfs_insert_some_items()
The break was in front of the "nr = i" assignment so that was never hit.
fs/btrfs/ctree.c +1 -1
@@ -3453,8 +3453,8 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans,for (i =0 ; i < nr; i++) {if (total_size + data_size[i] +sizeof (struct btrfs_item ) >BTRFS_LEAF_DATA_SIZE (root)) { -break ; nr = i; +break ; } total_data += data_size[i]; total_size += data_size[i] +sizeof (struct btrfs_item );
Hi,
Quoted 1 line · Dan Carpenter
The break was in front of the "nr = i" assignment so that was never hit.
This bug has been fixed a month ago, and the patch has been merged into the btrfs-unstable tree.
http://marc.info/?l=linux-btrfs&m=127434036913484&w=2
Thanks
Miao
Quoted 21 lines
Signed-off-by Dan Carpenter <[email protected]>fs/btrfs/ctree.c +1
-2@@ -3453,8 +3453,8 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans,for (i =0 ; i < nr; i++) {if (total_size + data_size[i] +sizeof (struct btrfs_item ) >BTRFS_LEAF_DATA_SIZE (root)) { -break ; nr = i; +break ; } total_data += data_size[i]; total_size += data_size[i] +sizeof (struct btrfs_item ); --To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Miao Xie
Hi,
Quoted 1 line · Dan Carpenter
The break was in front of the "nr = i" assignment so that was never hit.
This bug has been fixed a month ago, and the patch has been merged into the btrfs-unstable tree.
This was one that we took out to keep the pull request down to the critical fixes. That function actually isn't called, I'll just remove it.
-chris
Quoted 28 lines
http://marc.info/?l=linux-btrfs&m=127434036913484&w=2
Thanks
MiaoQuoted 21 lines
Signed-off-by Dan Carpenter <[email protected]>fs/btrfs/ctree.c +1
-2@@ -3453,8 +3453,8 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans,for (i =0 ; i < nr; i++) {if (total_size + data_size[i] +sizeof (struct btrfs_item ) >BTRFS_LEAF_DATA_SIZE (root)) { -break ; nr = i; +break ; } total_data += data_size[i]; total_size += data_size[i] +sizeof (struct btrfs_item ); --To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html