linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org, willy@infradead.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-m68k@lists.linux-m68k.org
Subject: Re: Issue with JFFS2 and a_ops->dirty_folio
Date: Thu, 13 Jun 2024 04:20:22 -0700	[thread overview]
Message-ID: <ZmrV9vLwj0uFj5Dn@infradead.org> (raw)
In-Reply-To: <0b657056-3a7f-46ba-8e99-a8fe2203901f@yoseli.org>

On Thu, Jun 13, 2024 at 09:05:17AM +0200, Jean-Michel Hautbois wrote:
> Hi everyone !
> 
> I am currently working on a Coldfire (MPC54418) and quite everything goes
> well, except that I can only execute one command from user space before
> getting a segmentation fault on the do_exit() syscall.

Looks like jffs2 is simply missing a dirty_folio implementation.  The
simple filemap_dirty_folio should do the job, please try the patch
below:


diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 62ea76da7fdf23..7124cbad6c35ae 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -19,6 +19,7 @@
 #include <linux/highmem.h>
 #include <linux/crc32.h>
 #include <linux/jffs2.h>
+#include <linux/writeback.h>
 #include "nodelist.h"
 
 static int jffs2_write_end(struct file *filp, struct address_space *mapping,
@@ -75,6 +76,7 @@ const struct address_space_operations jffs2_file_address_operations =
 	.read_folio =	jffs2_read_folio,
 	.write_begin =	jffs2_write_begin,
 	.write_end =	jffs2_write_end,
+	.dirty_folio =	filemap_dirty_folio,
 };
 
 static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)

  reply	other threads:[~2024-06-13 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13  7:05 Issue with JFFS2 and a_ops->dirty_folio Jean-Michel Hautbois
2024-06-13 11:20 ` Christoph Hellwig [this message]
2024-06-13 12:57   ` Jean-Michel Hautbois
2024-06-14 10:21   ` Jean-Michel Hautbois

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=ZmrV9vLwj0uFj5Dn@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=jeanmichel.hautbois@yoseli.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).