52 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3 * fs/f2fs/acl.h4 *5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.6 * http://www.samsung.com/7 *8 * Portions of this code from linux/fs/ext2/acl.h9 *10 * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>11 */12#ifndef __F2FS_ACL_H__13#define __F2FS_ACL_H__14 15#include <linux/posix_acl_xattr.h>16 17#define F2FS_ACL_VERSION 0x000118 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_ACL35 36extern struct posix_acl *f2fs_get_acl(struct inode *, int, bool);37extern int f2fs_set_acl(struct mnt_idmap *, struct dentry *,38 struct posix_acl *, int);39extern int f2fs_init_acl(struct inode *, struct inode *, struct page *,40 struct page *);41#else42#define f2fs_get_acl NULL43#define f2fs_set_acl NULL44 45static inline int f2fs_init_acl(struct inode *inode, struct inode *dir,46 struct page *ipage, struct page *dpage)47{48 return 0;49}50#endif51#endif /* __F2FS_ACL_H__ */52