@@ -223,9 +223,9 @@ static struct inode *simplefs_new_inode(struct inode *dir, mode_t mode)
223223 }
224224
225225 if (S_ISLNK (mode )) {
226- #if MNT_IDMAP_REQUIRED ( )
226+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
227227 inode_init_owner (& nop_mnt_idmap , inode , dir , mode );
228- #elif USER_NS_REQUIRED ( )
228+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
229229 inode_init_owner (& init_user_ns , inode , dir , mode );
230230#else
231231 inode_init_owner (inode , dir , mode );
@@ -255,9 +255,9 @@ static struct inode *simplefs_new_inode(struct inode *dir, mode_t mode)
255255 }
256256
257257 /* Initialize inode */
258- #if MNT_IDMAP_REQUIRED ( )
258+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
259259 inode_init_owner (& nop_mnt_idmap , inode , dir , mode );
260- #elif USER_NS_REQUIRED ( )
260+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
261261 inode_init_owner (& init_user_ns , inode , dir , mode );
262262#else
263263 inode_init_owner (inode , dir , mode );
@@ -302,13 +302,13 @@ static struct inode *simplefs_new_inode(struct inode *dir, mode_t mode)
302302 * - cleanup index block of the new inode
303303 * - add new file/directory in parent index
304304 */
305- #if MNT_IDMAP_REQUIRED ( )
305+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
306306static int simplefs_create (struct mnt_idmap * id ,
307307 struct inode * dir ,
308308 struct dentry * dentry ,
309309 umode_t mode ,
310310 bool excl )
311- #elif USER_NS_REQUIRED ( )
311+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
312312static int simplefs_create (struct user_namespace * ns ,
313313 struct inode * dir ,
314314 struct dentry * dentry ,
@@ -652,14 +652,14 @@ static int simplefs_unlink(struct inode *dir, struct dentry *dentry)
652652 return ret ;
653653}
654654
655- #if MNT_IDMAP_REQUIRED ( )
655+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
656656static int simplefs_rename (struct mnt_idmap * id ,
657657 struct inode * old_dir ,
658658 struct dentry * old_dentry ,
659659 struct inode * new_dir ,
660660 struct dentry * new_dentry ,
661661 unsigned int flags )
662- #elif USER_NS_REQUIRED ( )
662+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
663663static int simplefs_rename (struct user_namespace * ns ,
664664 struct inode * old_dir ,
665665 struct dentry * old_dentry ,
@@ -829,15 +829,15 @@ static int simplefs_rename(struct inode *old_dir,
829829 return ret ;
830830}
831831
832- #if MNT_IDMAP_REQUIRED ( )
832+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
833833static int simplefs_mkdir (struct mnt_idmap * id ,
834834 struct inode * dir ,
835835 struct dentry * dentry ,
836836 umode_t mode )
837837{
838838 return simplefs_create (id , dir , dentry , mode | S_IFDIR , 0 );
839839}
840- #elif USER_NS_REQUIRED ( )
840+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
841841static int simplefs_mkdir (struct user_namespace * ns ,
842842 struct inode * dir ,
843843 struct dentry * dentry ,
@@ -954,12 +954,12 @@ static int simplefs_link(struct dentry *old_dentry,
954954 return ret ;
955955}
956956
957- #if MNT_IDMAP_REQUIRED ( )
957+ #if SIMPLEFS_AT_LEAST ( 6 , 3 , 0 )
958958static int simplefs_symlink (struct mnt_idmap * id ,
959959 struct inode * dir ,
960960 struct dentry * dentry ,
961961 const char * symname )
962- #elif USER_NS_REQUIRED ( )
962+ #elif SIMPLEFS_AT_LEAST ( 5 , 12 , 0 )
963963static int simplefs_symlink (struct user_namespace * ns ,
964964 struct inode * dir ,
965965 struct dentry * dentry ,
0 commit comments