[3/5] ext4: let ext4_free_blocks handle multiblock correctly

Submitted by Yongqiang Yang on Nov. 15, 2011, 8:07 a.m.

Details

Message ID 1321344474-14707-3-git-send-email-xiaoqiangnk@gmail.com
State Rejected, archived
Headers show

Commit Message

Yongqiang Yang Nov. 15, 2011, 8:07 a.m.
We should not pass buffer whiose block number is not block + i.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/mballoc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o Dec. 28, 2011, 5:23 p.m.
On Tue, Nov 15, 2011 at 04:07:52PM +0800, Yongqiang Yang wrote:
> We should not pass buffer whiose block number is not block + i.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

This fixes a big in PATCH 2/5; see the comments for that patch.

     	     	    	       	   - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 2529efc..a64b3b8 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4572,6 +4572,7 @@  void ext4_free_blocks(handle_t *handle, struct inode *inode,
 							block + i);
 			ext4_forget(handle, flags & EXT4_FREE_BLOCKS_METADATA,
 				    inode, bh, block + i);
+			bh = NULL;
 		}
 	}