Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=131612dfe7923bd0ce5f82d6ed8303a7ef96e574
Commit:     131612dfe7923bd0ce5f82d6ed8303a7ef96e574
Parent:     a3f99f8ba8cbd2d4e231b767b3d6236a555da38c
Author:     Dimitri Gorokhovik <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 16:48:24 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 10:56:42 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ramfs/file-mmu.c   |    4 +++-
 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 0947fb5..54ebbc8 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 61cbe1e..e9d6c47 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 = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to