| Function report | 
| Source Code: fs\xattr.c | Create Date:2022-07-28 20:09:59 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Extended attribute SET operations
Proto:static long setxattr(struct dentry *d, const char __user *name, const void __user *value, size_t size, int flags)
Type:long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct dentry * | d | |
| const char __user * | name | |
| const void __user * | value | |
| size_t | size | |
| int | flags | 
| 418 | void * kvalue = NULL | 
| 421 | If flags & ~(set value, fail if attr already exists | set value, fail if attr does not exist ) Then Return -EINVAL | 
| 430 | If size Then | 
| 431 | If size > size of an extended attribute value (64k) Then Return -E2BIG | 
| 433 | kvalue = kvmalloc(size, GFP_KERNEL) | 
| 436 | If copy_from_user(kvalue, value, size) Then | 
| 440 | If strcmp(kname, XATTR_NAME_POSIX_ACL_ACCESS) == 0 || strcmp(kname, XATTR_NAME_POSIX_ACL_DEFAULT) == 0 Then posix_acl_fix_xattr_from_user(kvalue, size) | 
| 443 | Else if strcmp(kname, XATTR_NAME_CAPS) == 0 Then | 
| 452 | out : | 
| 455 | Return error | 
| Name | Describe | 
|---|---|
| path_setxattr | |
| SYSCALL_DEFINE5 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |