]> git.baikalelectronics.ru Git - kernel.git/commit
namei: prepare for idmapped mounts
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 21 Jan 2021 13:19:33 +0000 (14:19 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 24 Jan 2021 13:27:18 +0000 (14:27 +0100)
commitc2f0b56af237eeae4c4acaffd0c6847fda809642
treeece638b5b444e7aff9e6e132d7c0c16788d7583e
parentab1b825e919426433300fb2e8e466eebea0a6160
namei: prepare for idmapped mounts

The various vfs_*() helpers are called by filesystems or by the vfs
itself to perform core operations such as create, link, mkdir, mknod, rename,
rmdir, tmpfile and unlink. Enable them to handle idmapped mounts. If the
inode is accessed through an idmapped mount map it into the
mount's user namespace and pass it down. Afterwards the checks and
operations are identical to non-idmapped mounts. If the initial user
namespace is passed nothing changes so non-idmapped mounts will see
identical behavior as before.

Link: https://lore.kernel.org/r/20210121131959.646623-15-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
12 files changed:
drivers/base/devtmpfs.c
fs/cachefiles/namei.c
fs/ecryptfs/inode.c
fs/init.c
fs/namei.c
fs/nfsd/nfs4recover.c
fs/nfsd/vfs.c
fs/overlayfs/dir.c
fs/overlayfs/overlayfs.h
include/linux/fs.h
ipc/mqueue.c
net/unix/af_unix.c