aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-mpow.c
diff options
context:
space:
mode:
authorMike Yuan <[email protected]>2025-11-08 19:09:47 +0000
committerChristian Brauner <[email protected]>2025-11-12 09:43:22 +0000
commit3cd1548a278c7d6a9bdef1f1866e7cf66bfd3518 (patch)
tree67e2579ce3555e6ad5de53eafe049d7bc86d9005 /lib/mpi/mpi-mpow.c
parentfs/namespace: correctly handle errors returned by grab_requested_mnt_ns (diff)
downloadkernel-3cd1548a278c7d6a9bdef1f1866e7cf66bfd3518.tar.gz
kernel-3cd1548a278c7d6a9bdef1f1866e7cf66bfd3518.zip
shmem: fix tmpfs reconfiguration (remount) when noswap is set
In systemd we're trying to switch the internal credentials setup logic to new mount API [1], and I noticed fsconfig(FSCONFIG_CMD_RECONFIGURE) consistently fails on tmpfs with noswap option. This can be trivially reproduced with the following: ``` int fs_fd = fsopen("tmpfs", 0); fsconfig(fs_fd, FSCONFIG_SET_FLAG, "noswap", NULL, 0); fsconfig(fs_fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); fsmount(fs_fd, 0, 0); fsconfig(fs_fd, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0); <------ EINVAL ``` After some digging the culprit is shmem_reconfigure() rejecting !(ctx->seen & SHMEM_SEEN_NOSWAP) && sbinfo->noswap, which is bogus as ctx->seen serves as a mask for whether certain options are touched at all. On top of that, noswap option doesn't use fsparam_flag_no, hence it's not really possible to "reenable" swap to begin with. Drop the check and redundant SHMEM_SEEN_NOSWAP flag. [1] https://github.com/systemd/systemd/pull/39637 Fixes: 2c6efe9cf2d7 ("shmem: add support to ignore swap") Signed-off-by: Mike Yuan <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: Luis Chamberlain <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mpow.c')
0 files changed, 0 insertions, 0 deletions