[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1210376725.3639.66.camel@localhost.localdomain>
Date:	Fri, 09 May 2008 16:45:25 -0700
From:	Mingming Cao <cmm@...ibm.com>
To:	linux-ext4@...r.kernel.org
Subject: [PATCH]fix  delalloc write_begin failure case
Need to unlock and release the page from page cache if the delalloc
write_begin failed.
Signed-off-by: Mingming Cao <cmm@...ibm.com>
---
 fs/ext4/inode.c |    5 +++++
 1 file changed, 5 insertions(+)
Index: linux-2.6.26-rc1/fs/ext4/inode.c
===================================================================
--- linux-2.6.26-rc1.orig/fs/ext4/inode.c	2008-05-09 16:21:49.000000000 -0700
+++ linux-2.6.26-rc1/fs/ext4/inode.c	2008-05-09 16:25:26.000000000 -0700
@@ -1518,6 +1518,11 @@ static int ext4_da_write_begin(struct fi
 
 	ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
 							ext4_da_get_block_prep);
+	if (ret < 0) {
+		unlock_page(page);
+		page_cache_release(page);
+	}
+		
 	return ret;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists
 
