relay-update-relay-to-use-mmap_prepare.patch removed from -mm tree
The quilt patch titled
Subject: relay: update relay to use mmap_prepare
has been removed from the -mm tree. Its filename was
relay-update-relay-to-use-mmap_prepare.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Lorenzo Stoakes <[email protected]>
Subject: relay: update relay to use mmap_prepare
Date: Mon, 20 Oct 2025 13:11:22 +0100
It is relatively trivial to update this code to use the f_op->mmap_prepare hook in favour of the deprecated f_op->mmap hook, so do so.
---
kernel/relay.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)
kernel/relay.c renamed from kernel/relay.c~relay-update-relay-to-use-mmap_prepare +17 -16
@@ -72,17 +72,18 @@ static void relay_free_page_array(struct }/** -* relay_mmap_buf: - mmap channel buffer to process address space -* @buf: relay channel buffer -* @vma: vm_area_struct describing memory to be mapped +* relay_mmap_prepare_buf: - mmap channel buffer to process address space +* @buf: the relay channel buffer +* @desc: describing what to map * * Returns 0 if ok, negative on error * * Caller should already have grabbed mmap_lock. */ -static int relay_mmap_buf (struct rchan_buf *buf,struct vm_area_struct *vma) +static int relay_mmap_prepare_buf (struct rchan_buf *buf, +struct vm_area_desc *desc) { -unsigned long length = vma->vm_end - vma->vm_start; +unsigned long length =vma_desc_size (desc);if (!buf)return -EBADF ;
@@ -90,9 +91,9 @@ static int relay_mmap_buf(struct rchan_bif (length != (unsigned long )buf->chan->alloc_size)return -EINVAL ; - vma->vm_ops = &relay_file_mmap_ops; -vm_flags_set (vma,VM_DONTEXPAND ); - vma->vm_private_data = buf; + desc->vm_ops = &relay_file_mmap_ops; + desc->vm_flags |=VM_DONTEXPAND ; + desc->private_data = buf;return 0 ; }
@@ -749,16 +750,16 @@ static int relay_file_open(struct inode }/** -* relay_file_mmap - mmap file op for relay files -* @filp: the file -* @vma: the vma describing what to map +* relay_file_mmap_prepare - mmap file op for relay files +* @desc: describing what to map * -* Calls upon relay_mmap_buf() to map the file into user space. +* Calls upon relay_mmap_prepare_buf() to map the file into user space. */ -static int relay_file_mmap (struct file *filp,struct vm_area_struct *vma) +static int relay_file_mmap_prepare (struct vm_area_desc *desc) { -struct rchan_buf *buf = filp->private_data; -return relay_mmap_buf (buf, vma); +struct rchan_buf *buf = desc->file->private_data; + +return relay_mmap_prepare_buf (buf, desc); }/**
@@ -1006,7 +1007,7 @@ static ssize_t relay_file_read(struct ficonst struct file_operations relay_file_operations = { .open = relay_file_open, .poll = relay_file_poll, - .mmap = relay_file_mmap, + .mmap_prepare = relay_file_mmap_prepare, .read = relay_file_read, .release = relay_file_release, };
_
Patches currently in -mm which might be from [email protected] are
mm-introduce-vm_maybe_guard-and-make-visible-in-proc-pid-smaps.patch mm-add-atomic-vma-flags-and-set-vm_maybe_guard-as-such.patch mm-add-atomic-vma-flags-and-set-vm_maybe_guard-as-such-fix.patch mm-implement-sticky-vma-flags.patch mm-introduce-copy-on-fork-vmas-and-make-vm_maybe_guard-one.patch mm-set-the-vm_maybe_guard-flag-on-guard-region-install.patch mm-set-the-vm_maybe_guard-flag-on-guard-region-install-fix.patch tools-testing-vma-add-vma-sticky-userland-tests.patch tools-testing-selftests-mm-add-madv_collapse-test-case.patch tools-testing-selftests-mm-add-smaps-visibility-guard-region-test.patch mm-correctly-handle-uffd-pte-markers.patch mm-introduce-leaf-entry-type-and-use-to-simplify-leaf-entry-logic.patch mm-avoid-unnecessary-uses-of-is_swap_pte.patch mm-eliminate-is_swap_pte-when-softleaf_from_pte-suffices.patch mm-use-leaf-entries-in-debug-pgtable-remove-is_swap_pte.patch fs-proc-task_mmu-refactor-pagemap_pmd_range.patch mm-avoid-unnecessary-use-of-is_swap_pmd.patch mm-huge_memory-refactor-copy_huge_pmd-non-present-logic.patch mm-huge_memory-refactor-change_huge_pmd-non-present-logic.patch mm-replace-pmd_to_swp_entry-with-softleaf_from_pmd.patch mm-introduce-pmd_is_huge-and-use-where-appropriate.patch mm-remove-remaining-is_swap_pmd-users-and-is_swap_pmd.patch mm-remove-non_swap_entry-and-use-softleaf-helpers-instead.patch mm-remove-is_hugetlb_entry_.patch mm-eliminate-further-swapops-predicates.patch mm-replace-remaining-pte_to_swp_entry-with-softleaf_from_pte.patch mm-rename-walk_page_range_mm.patch mm-madvise-allow-guard-page-install-remove-under-vma-lock.patch mm-propagate-vm_softdirty-on-merge.patch testing-selftests-mm-add-soft-dirty-merge-self-test.patch mm-declare-vma-flags-by-bit.patch mm-declare-vma-flags-by-bit-fix.patch mm-declare-vma-flags-by-bit-fix-2.patch mm-simplify-and-rename-mm-flags-function-for-clarity.patch tools-testing-vma-eliminate-dependency-on-vma-__vm_flags.patch mm-introduce-vma-flags-bitmap-type.patch