On Tue, Nov 23, 2021 at 3:29 PM Christian Brauner <brauner@xxxxxxxxxx> wrote: > > From: Christian Brauner <christian.brauner@xxxxxxxxxx> > > The low-level mapping helpers were so far crammed into fs.h. They are > out of place there. The fs.h header should just contain the higher-level > mapping helpers that interact directly with vfs objects such as struct > super_block or struct inode and not the bare mapping helpers. Similarly, > only vfs and specific fs code shall interact with low-level mapping > helpers. And so they won't be made accessible automatically through > regular {g,u}id helpers. > > Cc: Seth Forshee <sforshee@xxxxxxxxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > CC: linux-fsdevel@xxxxxxxxxxxxxxx > Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx> > --- > include/linux/fs.h | 91 +------------------------------- > include/linux/mnt_mapping.h | 101 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 102 insertions(+), 90 deletions(-) > create mode 100644 include/linux/mnt_mapping.h > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 192242476b2b..eb69e8b035fa 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -41,6 +41,7 @@ > #include <linux/stddef.h> > #include <linux/mount.h> > #include <linux/cred.h> > +#include <linux/mnt_mapping.h> If I grepped correctly, there are ~20 files that use these helpers. Please put the include in those files, so changes to this header will not compile the world. And how about mnt_idmapping.h or idmapped_mnt.h? Not sure if this naming issue was discussed already. Thanks, Amir.