Skip to contentSkip to conversation

ovl: clean up compile error without CONFIG_FS_POSIX_ACL

-next Yipeng Zou 2 participants 2 messages Aug 5, 2022 Overlay filesystem

lore
Share & tools
lore

Yipeng Zou

author
#0 lore raw

fs/overlayfs/inode.c:462:13: error: ‘ovl_idmap_posix_acl’ defined but not used [-Werror=unused-function]
static void ovl_idmap_posix_acl(struct user_namespace *mnt_userns,

              ^~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make[2]: *** [fs/overlayfs/inode.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      make[1]: *** [fs/overlayfs] Error 2
      make: *** [fs] Error 2
      make: *** Waiting for unfinished jobs....
Fixes ded536561a36 ("ovl: improve ovl_get_acl() if POSIX ACL support is

off")

---
 fs/overlayfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/inode.c +1 -1
index 623e48dad606..b45fea69fff3 100644
@@ -454,6 +454,7 @@ ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size)
 	return res;
 }
 
+#ifdef CONFIG_FS_POSIX_ACL
 /*
  * Apply the idmapping of the layer to POSIX ACLs. The caller must pass a clone
  * of the POSIX ACLs retrieved from the lower layer to this function to not
@@ -491,7 +492,6 @@ static void ovl_idmap_posix_acl(struct user_namespace *mnt_userns,
  *
  * This is obviously only relevant when idmapped layers are used.
  */
-#ifdef CONFIG_FS_POSIX_ACL
 struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu)
 {
 	struct inode *realinode = ovl_inode_real(inode);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Yipeng Zou

fs/overlayfs/inode.c:462:13: error: ‘ovl_idmap_posix_acl’ defined but not used [-Werror=unused-function]
static void ovl_idmap_posix_acl(struct user_namespace *mnt_userns,

               ^~~~~~~~~~~~~~~~~~~
       cc1: all warnings being treated as errors
       make[2]: *** [fs/overlayfs/inode.o] Error 1
       make[2]: *** Waiting for unfinished jobs....
       make[1]: *** [fs/overlayfs] Error 2
       make: *** [fs] Error 2
       make: *** Waiting for unfinished jobs....\

LGTM,

merge request conflict casued this error[1].

[1]https://lkml.org/lkml/2022/8/3/369

Best Regards
Yang Xu

Quoted 29 lines
Fixes ded536561a36 ("ovl: improve ovl_get_acl() if POSIX ACL support is

off")

---
  fs/overlayfs/inode.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/inode.c +1 -1
index 623e48dad606..b45fea69fff3 100644
@@ -454,6 +454,7 @@ ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size)
  	return res;
  }
 
+#ifdef CONFIG_FS_POSIX_ACL
  /*
   * Apply the idmapping of the layer to POSIX ACLs. The caller must pass a clone
   * of the POSIX ACLs retrieved from the lower layer to this function to not
@@ -491,7 +492,6 @@ static void ovl_idmap_posix_acl(struct user_namespace *mnt_userns,
   *
   * This is obviously only relevant when idmapped layers are used.
   */
-#ifdef CONFIG_FS_POSIX_ACL
  struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu)
  {
  	struct inode *realinode = ovl_inode_real(inode);