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

From: Yifan Feng

Date: Sun Nov 29 2026 - 21:09:21 EST


On Sat, 28 Nov 2026 18:13:19 -0800 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> > # mount -t tmpfs -o 'mpol=prefer (many):0-1' none /mnt
>
> what's in /proc mounts at this point?

none /mnt tmpfs rw,relatime,inode64,mpol=prefer (many):0-1 0 0

That is seven fields where six are expected. findmnt and getmntent()
stop at the space, so the options they return end in "mpol=prefer".

> and what does /proc/mounts look like after making this change?

After the mount:

none /mnt tmpfs rw,relatime,inode64,mpol=prefer\040(many):0-1 0 0

After the remount with size=128M:

none /mnt tmpfs rw,relatime,size=131072k,inode64,mpol=prefer\040(many):0-1 0 0

findmnt and getmntent() decode the \040, and the options they return
end in "mpol=prefer (many):0-1".

I can send a v2 with these lines in the changelog if you prefer.

Thanks,
Yifan