Skip to content

Commit

Permalink
[PATCH] ramfs breaks without CONFIG_BLOCK
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dgorokho authored and Linus Torvalds committed Dec 30, 2006
1 parent a3f99f8 commit 131612d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fs/ramfs/file-mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 3 additions & 1 deletion fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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 = {
Expand Down

0 comments on commit 131612d

Please sign in to comment.