blob: bf7f960997d36a774ae26f382a4c0fdeb09f449b [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
Miklos Szeredi0cad6242021-08-18 22:08:24 +020013extern struct posix_acl *xfs_get_acl(struct inode *inode, int type, bool rcu);
Christian Brauner13e83a42023-01-13 12:49:20 +010014extern int xfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
Christian Brauner549c7292021-01-21 14:19:43 +010015 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
Yang Xu1a338502022-04-26 13:34:42 +100019#define xfs_get_acl NULL
20#define xfs_set_acl NULL
21static inline int __xfs_set_acl(struct inode *inode, struct posix_acl *acl,
22 int type)
Markus Trippelsdorfa5a7bbc2011-07-26 11:15:20 +020023{
Yang Xu1a338502022-04-26 13:34:42 +100024 return 0;
Markus Trippelsdorfa5a7bbc2011-07-26 11:15:20 +020025}
Christoph Hellwig5a3930e2020-02-26 17:30:41 -080026static inline void xfs_forget_acl(struct inode *inode, const char *name)
27{
28}
Christoph Hellwigef14f0c2009-06-10 17:07:47 +020029#endif /* CONFIG_XFS_POSIX_ACL */
Andreas Gruenbacher47e1bf62015-11-03 12:56:17 +110030
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#endif /* __XFS_ACL_H__ */