linux-next: manual merge of the ext3 tree with the mm-stable tree

From: Stephen Rothwell
Date: Thu Sep 05 2024 - 21:19:34 EST


Hi all,

Today's linux-next merge of the fs-next tree got a conflict in:

mm/filemap.c

between commit:

0a2d82946be6 ("mm: allow read-ahead with IOCB_NOWAIT set")

from the mm-stable tree and commit:

d23805138ac0 ("fsnotify: generate pre-content permission event on page fault")

from the ext3 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc mm/filemap.c
index 4fdd2e49f9dc,b722ce0ca6c5..000000000000
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@@ -46,7 -46,7 +46,8 @@@
#include <linux/pipe_fs_i.h>
#include <linux/splice.h>
#include <linux/rcupdate_wait.h>
+#include <linux/sched/mm.h>
+ #include <linux/fsnotify.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include "internal.h"
@@@ -3303,8 -3391,17 +3407,19 @@@ vm_fault_t filemap_fault(struct vm_faul
if (unlikely(index >= max_idx))
return VM_FAULT_SIGBUS;

+ trace_mm_filemap_fault(mapping, index);
+
+ /*
+ * If we have pre-content watchers then we need to generate events on
+ * page fault so that we can populate any data before the fault.
+ */
+ ret = __filemap_fsnotify_fault(vmf, &fpin);
+ if (unlikely(ret)) {
+ if (fpin)
+ fput(fpin);
+ return ret;
+ }
+
/*
* Do we have something in the page cache already?
*/

Attachment: pgp7GAfRvX4RI.pgp
Description: OpenPGP digital signature