Skip to content

Commit 84635d6

Browse files
committed
vfs: fix check_acl compile error when CONFIG_FS_POSIX_ACL is not set
Commit e77819e ("vfs: move ACL cache lookup into generic code") didn't take the FS_POSIX_ACL config variable into account - when that is not set, ACL's go away, and the cache helper functions do not exist, causing compile errors like fs/namei.c: In function 'check_acl': fs/namei.c:191:10: error: implicit declaration of function 'negative_cached_acl' fs/namei.c:196:2: error: implicit declaration of function 'get_cached_acl' fs/namei.c:196:6: warning: assignment makes pointer from integer without a cast fs/namei.c:212:11: error: implicit declaration of function 'set_cached_acl' Reported-by: Markus Trippelsdorf <[email protected]> Acked-by: Stephen Rothwell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 45b583b commit 84635d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/namei.c

+2
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ EXPORT_SYMBOL(putname);
176176

177177
static int check_acl(struct inode *inode, int mask)
178178
{
179+
#ifdef CONFIG_FS_POSIX_ACL
179180
struct posix_acl *acl;
180181

181182
/*
@@ -219,6 +220,7 @@ static int check_acl(struct inode *inode, int mask)
219220
posix_acl_release(acl);
220221
return error;
221222
}
223+
#endif
222224

223225
return -EAGAIN;
224226
}

0 commit comments

Comments
 (0)