Re: [PATCH v2] tmpfs: escape the space in the mpol mount option

From: David Hildenbrand

Date: Thu Dec 03 2026 - 05:56:42 EST


On Tue, 01 Dec 2026 16:18:43 -0800, Yifan Feng wrote:
> The policy names "weighted interleave" and "prefer (many)" contain a
> space, and shmem_show_mpol() prints the name as it is. Readers of
> /proc/mounts take the space as the end of the options field, so
> mount(8) reads back mpol=prefer and an unrelated remount replaces the
> policy:
>
> # mount -t tmpfs -o 'mpol=prefer (many):0-1' none /mnt
> # grep /mnt /proc/mounts
> none /mnt tmpfs rw,relatime,inode64,mpol=prefer (many):0-1 0 0
> # mount -o remount,size=128M /mnt
> # grep /mnt /proc/mounts
> none /mnt tmpfs rw,relatime,size=131072k,inode64,mpol=local 0 0
>
> [...]

Applied, thanks!

tree: mm/core.git
branch: shmem-7.5.misc

Applied patches will appear soon in mm-next, followed by linux-next.

Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.

It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.

[1/1] tmpfs: escape the space in the mpol mount option
https://git.kernel.org/mm/core/c/a17c1034

--
Cheers,

David