summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-01-13 12:49:09 +0100
committerChristian Brauner (Microsoft) <brauner@kernel.org>2023-01-18 17:51:45 +0100
commit64b4cdf22f3b002af4a7cb9651036b6248390286 (patch)
tree6a7894a14ea8ea208711f000aa00d1e2d5f43329
parentLinux 6.2-rc1 (diff)
downloadlinux-64b4cdf22f3b002af4a7cb9651036b6248390286.tar.xz
linux-64b4cdf22f3b002af4a7cb9651036b6248390286.zip
f2fs: project ids aren't idmapped
Project ids are only settable filesystem wide in the initial namespace. They don't take the mount's idmapping into account. Note, that after we converted everything over to struct mnt_idmap mistakes such as the one here aren't possible anymore as struct mnt_idmap cannot be passed to functions that operate on k{g,u}ids. Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
-rw-r--r--fs/f2fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 6032589099ce..30baa0e2a21c 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -246,7 +246,7 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
(F2FS_I(dir)->i_flags & F2FS_PROJINHERIT_FL))
F2FS_I(inode)->i_projid = F2FS_I(dir)->i_projid;
else
- F2FS_I(inode)->i_projid = make_kprojid(mnt_userns,
+ F2FS_I(inode)->i_projid = make_kprojid(&init_user_ns,
F2FS_DEF_PROJID);
err = fscrypt_prepare_new_inode(dir, inode, &encrypt);