public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BTRFS: unreachable code found
@ 2009-11-13 10:32 Jiri Slaby
  2009-11-13 21:36 ` Chris Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2009-11-13 10:32 UTC (permalink / raw)
  To: chris.mason; +Cc: zheng.yan, linux-btrfs, LKML

Hi,

Stanse found unreachable code in btrfs_insert_some_items below (don't
look at the line numbers, they are on preprocessed code). I would fix
that if I knew how.

Should the assignment be after the if, before the break or nowhere?

 3068|int btrfs_insert_some_items(struct btrfs_trans_handle *trans,
 3069|       struct btrfs_root *root,
 3070|       struct btrfs_path *path,
 3071|       struct btrfs_key *cpu_key, u32 *data_size,
 3072|       int nr)
 3073|{
...
 3086| for (i = 0; i < nr; i++) {
 3087|  if (total_size + data_size[i] + sizeof(struct btrfs_item) >
 3088|      (((root->leafsize) - sizeof(struct btrfs_header)))) {
 3089|   break;
 3090|   nr = i;
     |This node is unreachable prev next
 3091|  }
 3092|  total_data += data_size[i];
 3093|  total_size += data_size[i] + sizeof(struct btrfs_item);
 3094| }

regards,
-- 
js
Faculty of Informatics, Masaryk University
Suse Labs, Novell

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-13 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 10:32 BTRFS: unreachable code found Jiri Slaby
2009-11-13 21:36 ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox