Skip to contentSkip to conversation

ext4: Release page references acquired in ext4_da_block_invalidatepages

PATCH RESEND In review Jan Kara 2 participants 2 messages Mar 3, 2010 – Mar 4, 2010 ext4 file system

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

PATCH RESEND 1/1 ext4: Release page references acquired in ext4_da_block_invalidatepages

We forget to release page references we acquire in ext4_da_block_invalidatepages. Luckily, this function gets called only if we are not able to allocate blocks for delay-allocated data so that function should better never be called.

Also cleanup handling of index variable.

---
 fs/ext4/inode.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
fs/ext4/inode.c +1 -3
index c818972..1680007 100644
@@ -2127,17 +2127,16 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd,
 			break;
 		for (i = 0; i < nr_pages; i++) {
 			struct page *page = pvec.pages[i];
-			index = page->index;
-			if (index > end)
+			if (page->index > end)
 				break;
-			index++;
#1 lore raw
Quoted 9 lines · Jan Kara

We forget to release page references we acquire in ext4_da_block_invalidatepages. Luckily, this function gets called only if we are not able to allocate blocks for delay-allocated data so that function should better never be called.

Also cleanup handling of index variable.

Added to the ext4 patch queue, thanks.

- Ted