Skip to content

Commit

Permalink
vfs: fix check_acl compile error when CONFIG_FS_POSIX_ACL is not set
Browse files Browse the repository at this point in the history
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 <markus@trippelsdorf.de>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Jul 26, 2011
1 parent 45b583b commit 84635d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ EXPORT_SYMBOL(putname);

static int check_acl(struct inode *inode, int mask)
{
#ifdef CONFIG_FS_POSIX_ACL
struct posix_acl *acl;

/*
Expand Down Expand Up @@ -219,6 +220,7 @@ static int check_acl(struct inode *inode, int mask)
posix_acl_release(acl);
return error;
}
#endif

return -EAGAIN;
}
Expand Down

0 comments on commit 84635d6

Please sign in to comment.