blob: 124868c13f80fff51c6d214df8f26215b98b461e [file] [log] [blame]
Nishad Kamdard29fbcd2020-04-25 18:49:08 +05301/* SPDX-License-Identifier: GPL-2.0 */
Jaegeuk Kim0a8165d2012-11-29 13:28:09 +09002/*
Jaegeuk Kimaf48b852012-11-02 17:12:17 +09003 * fs/f2fs/acl.h
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com/
7 *
8 * Portions of this code from linux/fs/ext2/acl.h
9 *
10 * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
Jaegeuk Kimaf48b852012-11-02 17:12:17 +090011 */
12#ifndef __F2FS_ACL_H__
13#define __F2FS_ACL_H__
14
15#include <linux/posix_acl_xattr.h>
16
17#define F2FS_ACL_VERSION 0x0001
18
19struct f2fs_acl_entry {
20 __le16 e_tag;
21 __le16 e_perm;
22 __le32 e_id;
23};
24
25struct f2fs_acl_entry_short {
26 __le16 e_tag;
27 __le16 e_perm;
28};
29
30struct f2fs_acl_header {
31 __le32 a_version;
32};
33
34#ifdef CONFIG_F2FS_FS_POSIX_ACL
35
Jaegeuk Kimb8b60e12013-10-28 13:12:09 +090036extern struct posix_acl *f2fs_get_acl(struct inode *, int);
Jaegeuk Kim5302fb02016-07-22 15:25:47 -070037extern int f2fs_set_acl(struct inode *, struct posix_acl *, int);
Jaegeuk Kimbce8d112014-10-13 19:42:53 -070038extern int f2fs_init_acl(struct inode *, struct inode *, struct page *,
39 struct page *);
Jaegeuk Kimaf48b852012-11-02 17:12:17 +090040#else
Jaegeuk Kimaf48b852012-11-02 17:12:17 +090041#define f2fs_get_acl NULL
42#define f2fs_set_acl NULL
43
Jaegeuk Kim2ed2d5b2013-10-28 13:17:54 +090044static inline int f2fs_init_acl(struct inode *inode, struct inode *dir,
Jaegeuk Kimbce8d112014-10-13 19:42:53 -070045 struct page *ipage, struct page *dpage)
Jaegeuk Kimaf48b852012-11-02 17:12:17 +090046{
47 return 0;
48}
49#endif
50#endif /* __F2FS_ACL_H__ */