diff options
author | Dimitri Gorokhovik <dimitri.gorokhovik@free.fr> | 2006-12-29 16:48:24 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-01-10 11:05:20 -0800 |
commit | d0b18e5c89b42697dd2d5af55f4efc430b0586b1 (patch) | |
tree | 83cd73d52221311b5d60c50324686537a7701ab1 | |
parent | abf56f5ea98c71722511e37d321982013123dbbf (diff) | |
download | lwn-d0b18e5c89b42697dd2d5af55f4efc430b0586b1.tar.gz lwn-d0b18e5c89b42697dd2d5af55f4efc430b0586b1.zip |
[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: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | fs/ramfs/file-mmu.c | 4 | ||||
-rw-r--r-- | fs/ramfs/file-nommu.c | 4 |
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 @@ */ #include <linux/fs.h> +#include <linux/mm.h> const struct address_space_operations ramfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, - .commit_write = simple_commit_write + .commit_write = simple_commit_write, + .set_page_dirty = __set_page_dirty_nobuffers, }; const struct file_operations ramfs_file_operations = { diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index bfe5dbf1002e..24f6fafffabd 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -11,6 +11,7 @@ #include <linux/module.h> #include <linux/fs.h> +#include <linux/mm.h> #include <linux/pagemap.h> #include <linux/highmem.h> #include <linux/init.h> @@ -30,7 +31,8 @@ static int ramfs_nommu_setattr(struct dentry *, struct iattr *); const struct address_space_operations ramfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, - .commit_write = simple_commit_write + .commit_write = simple_commit_write, + .set_page_dirty = __set_page_dirty_nobuffers, }; const struct file_operations ramfs_file_operations = { |