Dave Chinner | 0b61f8a | 2018-06-05 19:42:14 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 3 | * Copyright (c) 2001-2005 Silicon Graphics, Inc. |
| 4 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __XFS_ACL_H__ |
| 7 | #define __XFS_ACL_H__ |
| 8 | |
Christoph Hellwig | ef14f0c | 2009-06-10 17:07:47 +0200 | [diff] [blame] | 9 | struct inode; |
| 10 | struct posix_acl; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #ifdef CONFIG_XFS_POSIX_ACL |
Christoph Hellwig | ef14f0c | 2009-06-10 17:07:47 +0200 | [diff] [blame] | 13 | extern struct posix_acl *xfs_get_acl(struct inode *inode, int type); |
Christian Brauner | 549c729 | 2021-01-21 14:19:43 +0100 | [diff] [blame] | 14 | extern int xfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode, |
| 15 | struct posix_acl *acl, int type); |
Jan Kara | 8ba3587 | 2017-06-26 08:48:18 -0700 | [diff] [blame] | 16 | extern int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type); |
Christoph Hellwig | 5a3930e | 2020-02-26 17:30:41 -0800 | [diff] [blame] | 17 | void xfs_forget_acl(struct inode *inode, const char *name); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #else |
Markus Trippelsdorf | a5a7bbc | 2011-07-26 11:15:20 +0200 | [diff] [blame] | 19 | static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type) |
| 20 | { |
| 21 | return NULL; |
| 22 | } |
Christoph Hellwig | 2401dc2 | 2013-12-20 05:16:50 -0800 | [diff] [blame] | 23 | # define xfs_set_acl NULL |
Christoph Hellwig | 5a3930e | 2020-02-26 17:30:41 -0800 | [diff] [blame] | 24 | static inline void xfs_forget_acl(struct inode *inode, const char *name) |
| 25 | { |
| 26 | } |
Christoph Hellwig | ef14f0c | 2009-06-10 17:07:47 +0200 | [diff] [blame] | 27 | #endif /* CONFIG_XFS_POSIX_ACL */ |
Andreas Gruenbacher | 47e1bf6 | 2015-11-03 12:56:17 +1100 | [diff] [blame] | 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #endif /* __XFS_ACL_H__ */ |