diff options
author | Christian Brauner <brauner@kernel.org> | 2023-09-22 13:49:05 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-09-22 14:09:06 +0200 |
commit | 9cf16b380af5bab7d0952b9aad0601ebf986de69 (patch) | |
tree | 3874ee5fc0494deab441b041362e733523e96c46 /fs/fsopen.c | |
parent | dede367149c48822c9f699291d71a3211c2a91bb (diff) |
fsconfig: ensure that dirfd is set to aux
The code in fs_param_is_fd() expects param->dirfd to be set to the fd
that was used to set param->file to initialize result->uint_32. So make
sure it's set so users like autofs using FSCONFIG_SET_FD with the new
mount api can rely on this to be set to the correct value.
Link: https://lore.kernel.org/lkml/20230922-vorbringen-spaghetti-946729122076@brauner
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/fsopen.c')
-rw-r--r-- | fs/fsopen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fsopen.c b/fs/fsopen.c index ce03f6521c88..6593ae518115 100644 --- a/fs/fsopen.c +++ b/fs/fsopen.c @@ -465,6 +465,7 @@ SYSCALL_DEFINE5(fsconfig, param.file = fget(aux); if (!param.file) goto out_key; + param.dirfd = aux; break; default: break; |