Fix break before assignment
PATCH 1/1 Fix break before assignment
Fix control flow to store count before breaking loop.
Signed-off-by Daniel J Blueman <[email protected]>
--- fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ctree.c +1 -1
@@ -3465,8 +3465,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 );
Signature · 1 line
1.7.9.5
Quoted 1 line · Daniel J Blueman
Fix control flow to store count before breaking loop.
http://www.mail-archive.com/[email protected]/msg10483.html
but it's a dead code anyway.
Quoted 5 lines · David Sterba
Quoted 1 line · Daniel J Blueman
Fix control flow to store count before breaking loop.
http://www.mail-archive.com/[email protected]/msg10483.html
but it's a dead code anyway.
Noted.
Chris, is it a good time to take out btrfs_insert_some_items or, if keeping it, apply David's patch to avoid related surprises?
Thanks,
Daniel
Signature · 1 line
Daniel J Blueman