blob: 7bdb3a4ed798f990dc8a69595ddbdbc44b0ed08e [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);
Christian Brauner549c7292021-01-21 14:19:43 +010014extern int xfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
15 struct posix_acl *acl, int type);
Jan Kara8ba35872017-06-26 08:48:18 -070016extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
Christoph Hellwig5a3930e2020-02-26 17:30:41 -080017void xfs_forget_acl(struct inode *inode, const char *name);
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#else
Markus Trippelsdorfa5a7bbc2011-07-26 11:15:20 +020019static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type)
20{
21 return NULL;
22}
Christoph Hellwig2401dc22013-12-20 05:16:50 -080023# define xfs_set_acl NULL
Christoph Hellwig5a3930e2020-02-26 17:30:41 -080024static inline void xfs_forget_acl(struct inode *inode, const char *name)
25{
26}
Christoph Hellwigef14f0c2009-06-10 17:07:47 +020027#endif /* CONFIG_XFS_POSIX_ACL */
Andreas Gruenbacher47e1bf62015-11-03 12:56:17 +110028
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#endif /* __XFS_ACL_H__ */