linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -V2 1/2] ext4: unlock group before returning on error
@ 2008-11-03  8:02 Aneesh Kumar K.V
  2008-11-03  8:02 ` [PATCH -V2 2/2] ext4: Convert to host order before using the values Aneesh Kumar K.V
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2008-11-03  8:02 UTC (permalink / raw)
  To: cmm, tytso, sandeen; +Cc: linux-ext4, Aneesh Kumar K.V

with errors=continue we need to make sure we need
to unlock the group before returning.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/ext4/mballoc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index d523e42..0643f9c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4446,6 +4446,7 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
 		else if (block >= (entry->start_blk + entry->count))
 			n = &(*n)->rb_right;
 		else {
+			ext4_unlock_group(sb, group);
 			ext4_error(sb, __func__,
 			    "Double free of blocks %d (%d %d)\n",
 			    block, entry->start_blk, entry->count);
-- 
1.6.0.3.514.g2f91b


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

* [PATCH -V2 2/2] ext4: Convert to host order before using the values.
  2008-11-03  8:02 [PATCH -V2 1/2] ext4: unlock group before returning on error Aneesh Kumar K.V
@ 2008-11-03  8:02 ` Aneesh Kumar K.V
  2008-11-04 20:15   ` Theodore Tso
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2008-11-03  8:02 UTC (permalink / raw)
  To: cmm, tytso, sandeen; +Cc: linux-ext4, Aneesh Kumar K.V

Use le16_to_cpu to read the s_reserved_gdt_blocks values
from super block.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/ext4/super.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 87ac84b..5bfc235 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1464,9 +1464,8 @@ static int ext4_fill_flex_info(struct super_block *sb)
 
 	/* We allocate both existing and potentially added groups */
 	flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
-			    ((sbi->s_es->s_reserved_gdt_blocks +1 ) <<
-			      EXT4_DESC_PER_BLOCK_BITS(sb))) /
-			   groups_per_flex;
+			((le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) + 1) <<
+			      EXT4_DESC_PER_BLOCK_BITS(sb))) / groups_per_flex;
 	sbi->s_flex_groups = kzalloc(flex_group_count *
 				     sizeof(struct flex_groups), GFP_KERNEL);
 	if (sbi->s_flex_groups == NULL) {
-- 
1.6.0.3.514.g2f91b


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

* Re: [PATCH -V2 2/2] ext4: Convert to host order before using the values.
  2008-11-03  8:02 ` [PATCH -V2 2/2] ext4: Convert to host order before using the values Aneesh Kumar K.V
@ 2008-11-04 20:15   ` Theodore Tso
  0 siblings, 0 replies; 3+ messages in thread
From: Theodore Tso @ 2008-11-04 20:15 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: cmm, sandeen, linux-ext4

Thanks, both of these patches have been added to the ext4 patch queue.

	     	      	      	   	      	 - Ted

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

end of thread, other threads:[~2008-11-04 20:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03  8:02 [PATCH -V2 1/2] ext4: unlock group before returning on error Aneesh Kumar K.V
2008-11-03  8:02 ` [PATCH -V2 2/2] ext4: Convert to host order before using the values Aneesh Kumar K.V
2008-11-04 20:15   ` Theodore Tso

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).