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 |
Miklos Szeredi | 0cad624 | 2021-08-18 22:08:24 +0200 | [diff] [blame] | 13 | extern struct posix_acl *xfs_get_acl(struct inode *inode, int type, bool rcu); |
Christian Brauner | 13e83a4 | 2023-01-13 12:49:20 +0100 | [diff] [blame] | 14 | extern int xfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, |
Christian Brauner | 549c729 | 2021-01-21 14:19:43 +0100 | [diff] [blame] | 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 |
Yang Xu | 1a33850 | 2022-04-26 13:34:42 +1000 | [diff] [blame] | 19 | #define xfs_get_acl NULL |
| 20 | #define xfs_set_acl NULL |
| 21 | static inline int __xfs_set_acl(struct inode *inode, struct posix_acl *acl, |
| 22 | int type) |
Markus Trippelsdorf | a5a7bbc | 2011-07-26 11:15:20 +0200 | [diff] [blame] | 23 | { |
Yang Xu | 1a33850 | 2022-04-26 13:34:42 +1000 | [diff] [blame] | 24 | return 0; |
Markus Trippelsdorf | a5a7bbc | 2011-07-26 11:15:20 +0200 | [diff] [blame] | 25 | } |
Christoph Hellwig | 5a3930e | 2020-02-26 17:30:41 -0800 | [diff] [blame] | 26 | static inline void xfs_forget_acl(struct inode *inode, const char *name) |
| 27 | { |
| 28 | } |
Christoph Hellwig | ef14f0c | 2009-06-10 17:07:47 +0200 | [diff] [blame] | 29 | #endif /* CONFIG_XFS_POSIX_ACL */ |
Andreas Gruenbacher | 47e1bf6 | 2015-11-03 12:56:17 +1100 | [diff] [blame] | 30 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #endif /* __XFS_ACL_H__ */ |