blob: c042c0868016366a52b9bc9a76f33dcf24b9aed9 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Nathan Scott7b718762005-11-02 14:58:39 +11003 * Copyright (c) 2001-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6#ifndef __XFS_ACL_H__
7#define __XFS_ACL_H__
8
Christoph Hellwigef14f0c2009-06-10 17:07:47 +02009struct inode;
10struct posix_acl;
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#ifdef CONFIG_XFS_POSIX_ACL
Christoph Hellwigef14f0c2009-06-10 17:07:47 +020013extern struct posix_acl *xfs_get_acl(struct inode *inode, int type);
Christoph Hellwig2401dc22013-12-20 05:16:50 -080014extern int xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
Jan Kara8ba35872017-06-26 08:48:18 -070015extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
Christoph Hellwig5a3930e2020-02-26 17:30:41 -080016void xfs_forget_acl(struct inode *inode, const char *name);
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#else
Markus Trippelsdorfa5a7bbc2011-07-26 11:15:20 +020018static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type)
19{
20 return NULL;
21}
Christoph Hellwig2401dc22013-12-20 05:16:50 -080022# define xfs_set_acl NULL
Christoph Hellwig5a3930e2020-02-26 17:30:41 -080023static inline void xfs_forget_acl(struct inode *inode, const char *name)
24{
25}
Christoph Hellwigef14f0c2009-06-10 17:07:47 +020026#endif /* CONFIG_XFS_POSIX_ACL */
Andreas Gruenbacher47e1bf62015-11-03 12:56:17 +110027
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#endif /* __XFS_ACL_H__ */