Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\nfs_common\nfsacl.c Create Date:2022-07-28 20:29:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sacl_encode - Encode an NFSv3 ACL*@buf: destination xdr_buf to contain XDR encoded ACL*@base: byte offset in xdr_buf where XDR'd ACL begins*@inode: inode of file whose ACL this is*@acl: posix_acl to encode*@encode_entries: whether to encode ACEs as

Proto:int nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, struct posix_acl *acl, int encode_entries, int typeflag)

Type:int

Parameter:

TypeParameterName
struct xdr_buf *buf
unsigned intbase
struct inode *inode
struct posix_acl *acl
intencode_entries
inttypeflag
95  entries = If acl && a_count Then max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, a_count, 4) Else 0
96  struct nfsacl_encode_desc nfsacl_desc = {desc = {elem_size = 12, array_len = encode_entries ? entries : 0, xcode = xdr_nfsace_encode, }, acl = acl, typeflag = typeflag, uid = i_uid, gid = i_gid, }
110  If entries > Maximum number of ACL entries over NFS || xdr_encode_word(buf, base, entries) Then Return -EINVAL
113  If encode_entries && acl && a_count == 3 Then
114  acl2 = acl
120  Init a fresh posix_acl
124  a_entries[0] = a_entries[0]
125  a_entries[1] = a_entries[1]
126  a_entries[2] = a_entries[1]
127  e_tag = ACL_MASK
128  a_entries[3] = a_entries[2]
129  acl = acl2
131  err = xdr_encode_array2(buf, base + 4, & desc)
132  If Not err Then err = 8 + elem_size * array_len
135  Return err