linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitriy Monakhov <dmonakhov@openvz.org>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, viro@zeniv.linux.org.uk,
	David Miller <davem@davemloft.net>,
	Dmitriy Monakhov <dmonakhov@openvz.org>
Subject: [PATCH] mm: D-cache flushing was forgotten
Date: Fri, 06 Oct 2006 13:44:50 +0400	[thread overview]
Message-ID: <87psd5lqwd.fsf@sw.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Here is a patch that add D-cache flushing  routine
after page was changed. It is forgotten in current code.

David Miller agree with patch.

Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>


[-- Attachment #2: diff-buffer-flush-dcache-page --]
[-- Type: text/plain, Size: 624 bytes --]

diff --git a/fs/buffer.c b/fs/buffer.c
index 71649ef..b2652aa 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2008,6 +2008,7 @@ static int __block_prepare_write(struct 
 			clear_buffer_new(bh);
 			kaddr = kmap_atomic(page, KM_USER0);
 			memset(kaddr+block_start, 0, bh->b_size);
+			flush_dcache_page(page);
 			kunmap_atomic(kaddr, KM_USER0);
 			set_buffer_uptodate(bh);
 			mark_buffer_dirty(bh);
@@ -2514,6 +2515,7 @@ failed:
 	 */
 	kaddr = kmap_atomic(page, KM_USER0);
 	memset(kaddr, 0, PAGE_CACHE_SIZE);
+	flush_dcache_page(page);
 	kunmap_atomic(kaddr, KM_USER0);
 	SetPageUptodate(page);
 	set_page_dirty(page);

                 reply	other threads:[~2006-10-06  9:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psd5lqwd.fsf@sw.ru \
    --to=dmonakhov@openvz.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox