linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: dimitri.gorokhovik@free.fr
From: Dimitri Gorokhovik <dimitri.gorokhovik@free.fr>
To: akpm@osdl.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/1 2.6.20-rc2] MM: ramfs breaks without CONFIG_BLOCK
Date: Tue, 26 Dec 2006 18:09:47 +0100	[thread overview]
Message-ID: <1167152987.4591575b1a824@imp8-g19.free.fr> (raw)

ramfs doesn't provide the .set_dirty_page a_op, and when the BLOCK
layer is not configured in, 'set_page_dirty' makes a call via a NULL
pointer.

Signed-off-by: Dimitri Gorokhovik <dimitri.gorokhovik@free.fr>

---

--- linux-2.6.20-rc2-orig/mm/page-writeback.c	2006-12-26
15:12:21.000000000 +0100
+++ linux-2.6.20-rc2/mm/page-writeback.c	2006-12-26 18:32:26.000000000
+0100
@@ -800,8 +800,8 @@ int redirty_page_for_writepage(struct wr
 EXPORT_SYMBOL(redirty_page_for_writepage);

 /*
- * If the mapping doesn't provide a set_page_dirty a_op, then
- * just fall through and assume that it wants buffer_heads.
+ * If the mapping doesn't provide a set_page_dirty a_op, and the BLOCK
layer is
+ * available, just fall through and assume that it wants buffer_heads.
  */
 int fastcall set_page_dirty(struct page *page)
 {
@@ -812,8 +812,12 @@ int fastcall set_page_dirty(struct page
 #ifdef CONFIG_BLOCK
 		if (!spd)
 			spd = __set_page_dirty_buffers;
-#endif
 		return (*spd)(page);
+#else
+		if (spd)
+			return (*spd)(page);
+#endif
+
 	}
 	if (!PageDirty(page)) {
 		if (!TestSetPageDirty(page))


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2006-12-26 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-26 17:09 dimitri.gorokhovik, Dimitri Gorokhovik [this message]
2006-12-27  9:03 ` Andrew Morton

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=1167152987.4591575b1a824@imp8-g19.free.fr \
    --to=dimitri.gorokhovik@free.fr \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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