| To: | David Chinner <dgc@xxxxxxx> |
|---|---|
| Subject: | Re: Review: Clear unwritten flag on during partial page truncation |
| From: | Lachlan McIlroy <lachlan@xxxxxxx> |
| Date: | Wed, 20 Dec 2006 08:21:54 +0000 |
| Cc: | xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx |
| In-reply-to: | <20061220062813.GU44411608@xxxxxxxxxxxxxxxxx> |
| Organization: | SGI |
| References: | <20061220062813.GU44411608@xxxxxxxxxxxxxxxxx> |
| Reply-to: | lachlan@xxxxxxx |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.7.12) Gecko/20050920 |
@@ -41,6 +41,8 @@
#include <linux/pagevec.h>
#include <linux/writeback.h>
+STATIC void xfs_vm_invalidatepage(struct page *, unsigned long);
+
STATIC void
xfs_count_page_state(
struct page *page,
@@ -1061,7 +1063,7 @@ error:
*/
if (err != -EAGAIN) {
if (!unmapped)
- block_invalidatepage(page, 0);
+ xfs_vm_invalidatepage(page, 0);
We pass in an offset of zero here...
@@ -1458,6 +1468,32 @@ xfs_vm_invalidatepage(
{
xfs_page_trace(XFS_INVALIDPAGE_ENTER,
page->mapping->host, page, offset);
+
+ /*
+ * Need to clear private flags from buffers on partial
+ * page truncations ourselves. Same inner loop as
+ * block_invalidatepage() is used.
+ */
+ if (offset && page_has_buffers(page)) {
And only do this code for non-zero offsets. Are you sure this is correct?
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Review: Clear unwritten flag on during partial page truncation, David Chinner |
|---|---|
| Next by Date: | Re: Review: Fix use after free on forced shutdown, Lachlan McIlroy |
| Previous by Thread: | Review: Clear unwritten flag on during partial page truncation, David Chinner |
| Next by Thread: | Re: Review: Clear unwritten flag on during partial page truncation, David Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |