linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] btrfs: make code reachable in btrfs_insert_some_items()
@ 2010-06-28 11:17 Dan Carpenter
  2010-06-29  0:57 ` Miao Xie
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2010-06-28 11:17 UTC (permalink / raw)
  To: Chris Mason
  Cc: Yan Zheng, Diego Calleja, linux-btrfs, linux-kernel, kernel-janitors

The break was in front of the "nr = i" assignment so that was never hit.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 0d1d966..ceb8ad2 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -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);

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

* Re: [patch] btrfs: make code reachable in btrfs_insert_some_items()
  2010-06-28 11:17 [patch] btrfs: make code reachable in btrfs_insert_some_items() Dan Carpenter
@ 2010-06-29  0:57 ` Miao Xie
  2010-06-29  1:04   ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Miao Xie @ 2010-06-29  0:57 UTC (permalink / raw)
  To: Dan Carpenter, Chris Mason, Yan Zheng, Diego Calleja,
	linux-btrfs, linux-kerne

Hi,

on 2010-6-28 19:17, Dan Carpenter wrote:
> 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
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 0d1d966..ceb8ad2 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [patch] btrfs: make code reachable in btrfs_insert_some_items()
  2010-06-29  0:57 ` Miao Xie
@ 2010-06-29  1:04   ` Chris Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Mason @ 2010-06-29  1:04 UTC (permalink / raw)
  To: Miao Xie
  Cc: Dan Carpenter, Yan Zheng, Diego Calleja, linux-btrfs,
	linux-kernel, kernel-janitors

On Tue, Jun 29, 2010 at 08:57:54AM +0800, Miao Xie wrote:
> Hi,
> 
> on 2010-6-28 19:17, Dan Carpenter wrote:
> > 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

> 
>   http://marc.info/?l=linux-btrfs&m=127434036913484&w=2
> 
> Thanks
> Miao
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > 
> > diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> > index 0d1d966..ceb8ad2 100644
> > --- a/fs/btrfs/ctree.c
> > +++ b/fs/btrfs/ctree.c
> > @@ -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 majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

end of thread, other threads:[~2010-06-29  1:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 11:17 [patch] btrfs: make code reachable in btrfs_insert_some_items() Dan Carpenter
2010-06-29  0:57 ` Miao Xie
2010-06-29  1:04   ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).