Lines Matching defs:size
344 static bool is_v2header(size_t size, const struct vfs_cap_data *cap)
346 if (size != XATTR_CAPS_SZ_2)
351 static bool is_v3header(size_t size, const struct vfs_cap_data *cap)
353 if (size != XATTR_CAPS_SZ_3)
372 int size, ret;
389 size = sizeof(struct vfs_ns_cap_data);
391 &tmpbuf, size, GFP_NOFS);
395 size = ret;
407 size = -EINVAL;
417 size = sizeof(struct vfs_ns_cap_data);
421 nscap = kzalloc(size, GFP_ATOMIC);
423 size = -ENOMEM;
443 size = -EOVERFLOW;
448 size = sizeof(struct vfs_cap_data);
452 cap = kzalloc(size, GFP_ATOMIC);
454 size = -ENOMEM;
471 return size;
474 static kuid_t rootid_from_xattr(const void *value, size_t size,
480 if (size == XATTR_CAPS_SZ_3)
486 static bool validheader(size_t size, const struct vfs_cap_data *cap)
488 return is_v2header(size, cap) || is_v3header(size, cap);
495 * If all is ok, we return the new size, on error return < 0.
497 int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size)
511 if (!validheader(size, cap))
515 if (size == XATTR_CAPS_SZ_2)
518 return size;
520 rootid = rootid_from_xattr(*ivalue, size, task_ns);
597 int size;
609 size = __vfs_getxattr((struct dentry *)dentry, inode,
611 if (size == -ENODATA || size == -EOPNOTSUPP)
615 if (size < 0)
616 return size;
618 if (size < sizeof(magic_etc))
626 if (size != XATTR_CAPS_SZ_1)
631 if (size != XATTR_CAPS_SZ_2)
636 if (size != XATTR_CAPS_SZ_3)
925 * @size: The size of value
935 const void *value, size_t size, int flags)
1318 * @pages: The size of the mapping