aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Gorokhovik <dimitri.gorokhovik@free.fr>2006-12-29 19:48:24 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:42 -0500
commit131612dfe7923bd0ce5f82d6ed8303a7ef96e574 (patch)
tree37e3988d2039f413102f23fce08203c8aca600bc
parenta3f99f8ba8cbd2d4e231b767b3d6236a555da38c (diff)
[PATCH] ramfs breaks without CONFIG_BLOCK
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> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/ramfs/file-mmu.c4
-rw-r--r--fs/ramfs/file-nommu.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
index 0947fb57dcf3..54ebbc84207f 100644
--- a/fs/ramfs/file-mmu.c
+++ b/fs/ramfs/file-mmu.c
@@ -25,11 +25,13 @@
25 */ 25 */
26 26
27#include <linux/fs.h> 27#include <linux/fs.h>
28#include <linux/mm.h>
28 29
29const struct address_space_operations ramfs_aops = { 30const struct address_space_operations ramfs_aops = {
30 .readpage = simple_readpage, 31 .readpage = simple_readpage,
31 .prepare_write = simple_prepare_write, 32 .prepare_write = simple_prepare_write,
32 .commit_write = simple_commit_write 33 .commit_write = simple_commit_write,
34 .set_page_dirty = __set_page_dirty_nobuffers,
33}; 35};
34 36
35const struct file_operations ramfs_file_operations = { 37const struct file_operations ramfs_file_operations = {
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 61cbe1ef06b9..e9d6c4733282 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <linux/mm.h>
14#include <linux/pagemap.h> 15#include <linux/pagemap.h>
15#include <linux/highmem.h> 16#include <linux/highmem.h>
16#include <linux/init.h> 17#include <linux/init.h>
@@ -30,7 +31,8 @@ static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
30const struct address_space_operations ramfs_aops = { 31const struct address_space_operations ramfs_aops = {
31 .readpage = simple_readpage, 32 .readpage = simple_readpage,
32 .prepare_write = simple_prepare_write, 33 .prepare_write = simple_prepare_write,
33 .commit_write = simple_commit_write 34 .commit_write = simple_commit_write,
35 .set_page_dirty = __set_page_dirty_nobuffers,
34}; 36};
35 37
36const struct file_operations ramfs_file_operations = { 38const struct file_operations ramfs_file_operations = {