[-next] ovl: clean up compile error without CONFIG_FS_POSIX_ACL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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....

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Fixes: ded536561a36 ("ovl: improve ovl_get_acl() if POSIX ACL support is
off")
Signed-off-by: Yipeng Zou <zouyipeng@xxxxxxxxxx>
---
 fs/overlayfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 623e48dad606..b45fea69fff3 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -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);
-- 
2.17.1




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux