On Tue, Mar 14, 2023 at 12:51:10PM +0100, Christian Brauner wrote: > +++ b/include/linux/fs.h > @@ -2675,6 +2675,8 @@ extern struct inode *new_inode(struct super_block *sb); > extern void free_inode_nonrcu(struct inode *inode); > extern int setattr_should_drop_suidgid(struct mnt_idmap *, struct inode *); > extern int file_remove_privs(struct file *); > +int setattr_should_drop_sgid(struct mnt_idmap *idmap, > + const struct inode *inode); Is there a reason that setattr_should_drop_sgid() doesn't take a const struct mnt_idmap pointer?