/fs/fuse/ |
D | xattr.c | 15 size_t size, int flags) in fuse_setxattr() argument 26 inarg.size = size; in fuse_setxattr() 31 args.in_args[0].size = sizeof(inarg); in fuse_setxattr() 33 args.in_args[1].size = strlen(name) + 1; in fuse_setxattr() 35 args.in_args[2].size = size; in fuse_setxattr() 50 size_t size) in fuse_getxattr() argument 62 inarg.size = size; in fuse_getxattr() 66 args.in_args[0].size = sizeof(inarg); in fuse_getxattr() 68 args.in_args[1].size = strlen(name) + 1; in fuse_getxattr() 72 if (size) { in fuse_getxattr() [all …]
|
D | acl.c | 17 int size; in fuse_get_acl() local 35 size = fuse_getxattr(inode, name, value, PAGE_SIZE); in fuse_get_acl() 36 if (size > 0) in fuse_get_acl() 37 acl = posix_acl_from_xattr(fc->user_ns, value, size); in fuse_get_acl() 38 else if ((size == 0) || (size == -ENODATA) || in fuse_get_acl() 39 (size == -EOPNOTSUPP && fc->no_getxattr)) in fuse_get_acl() 41 else if (size == -ERANGE) in fuse_get_acl() 44 acl = ERR_PTR(size); in fuse_get_acl() 74 size_t size = posix_acl_xattr_size(acl->a_count); in fuse_set_acl() local 77 if (size > PAGE_SIZE) in fuse_set_acl() [all …]
|
/fs/ |
D | xattr.c | 139 const void *value, size_t size, int flags) in __vfs_setxattr() argument 148 if (size == 0) in __vfs_setxattr() 150 return handler->set(handler, dentry, inode, name, value, size, flags); in __vfs_setxattr() 171 const void *value, size_t size, int flags) in __vfs_setxattr_noperm() argument 181 error = __vfs_setxattr(dentry, inode, name, value, size, flags); in __vfs_setxattr_noperm() 185 size, flags); in __vfs_setxattr_noperm() 198 size, flags); in __vfs_setxattr_noperm() 210 size_t size, int flags) in vfs_setxattr() argument 220 error = security_inode_setxattr(dentry, name, value, size, flags); in vfs_setxattr() 224 error = __vfs_setxattr_noperm(dentry, name, value, size, flags); in vfs_setxattr() [all …]
|
D | seq_file.c | 27 m->count = m->size; in seq_set_overflow() 30 static void *seq_buf_alloc(unsigned long size) in seq_buf_alloc() argument 32 return kvmalloc(size, GFP_KERNEL_ACCOUNT); in seq_buf_alloc() 104 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in traverse() 140 m->buf = seq_buf_alloc(m->size <<= 1); in traverse() 153 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument 204 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in seq_read() 210 n = min(m->count, size); in seq_read() 216 size -= n; in seq_read() 219 if (!size) in seq_read() [all …]
|
/fs/hfs/ |
D | trans.c | 39 int srclen, dstlen, size; in hfs_mac2asc() local 52 size = nls_disk->char2uni(src, srclen, &ch); in hfs_mac2asc() 53 if (size <= 0) { in hfs_mac2asc() 55 size = 1; in hfs_mac2asc() 57 src += size; in hfs_mac2asc() 58 srclen -= size; in hfs_mac2asc() 65 size = nls_io->uni2char(ch, dst, dstlen); in hfs_mac2asc() 66 if (size < 0) { in hfs_mac2asc() 67 if (size == -ENAMETOOLONG) in hfs_mac2asc() 70 size = 1; in hfs_mac2asc() [all …]
|
D | mdb.c | 33 sector_t *start, sector_t *size) in hfs_get_last_session() argument 41 *size = i_size_read(sb->s_bdev->bd_inode) >> 9; in hfs_get_last_session() 73 int off2, len, size, sect; in hfs_mdb_get() local 79 size = sb_min_blocksize(sb, HFS_SECTOR_SIZE); in hfs_mdb_get() 80 if (!size) in hfs_mdb_get() 102 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); in hfs_mdb_get() 103 if (!size || (size & (HFS_SECTOR_SIZE - 1))) { in hfs_mdb_get() 104 pr_err("bad allocation block size %d\n", size); in hfs_mdb_get() 108 size = min(HFS_SB(sb)->alloc_blksz, (u32)PAGE_SIZE); in hfs_mdb_get() 110 while (size & (size - 1)) in hfs_mdb_get() [all …]
|
D | attr.c | 23 const void *value, size_t size, int flags) in __hfs_setxattr() argument 46 if (size == 4) in __hfs_setxattr() 53 if (size == 4) in __hfs_setxattr() 69 void *value, size_t size) in __hfs_getxattr() argument 79 if (size) { in __hfs_getxattr() 94 if (size >= 4) { in __hfs_getxattr() 98 res = size ? -ERANGE : 4; in __hfs_getxattr() 102 if (size >= 4) { in __hfs_getxattr() 106 res = size ? -ERANGE : 4; in __hfs_getxattr() 111 if (size) in __hfs_getxattr() [all …]
|
/fs/jffs2/ |
D | nodelist.c | 59 uint32_t jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint32_t size) in jffs2_truncate_fragtree() argument 61 struct jffs2_node_frag *frag = jffs2_lookup_node_frag(list, size); in jffs2_truncate_fragtree() 63 dbg_fragtree("truncating fragtree to 0x%08x bytes\n", size); in jffs2_truncate_fragtree() 66 if (frag && frag->ofs != size) { in jffs2_truncate_fragtree() 67 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree() 68 frag->size = size - frag->ofs; in jffs2_truncate_fragtree() 72 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree() 80 if (size == 0) in jffs2_truncate_fragtree() 88 if (frag->ofs + frag->size < size) in jffs2_truncate_fragtree() 89 return frag->ofs + frag->size; in jffs2_truncate_fragtree() [all …]
|
/fs/ocfs2/ |
D | ocfs2_fs.h | 1056 #define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \ argument 1263 int size; in ocfs2_extent_recs_per_inode() local 1265 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode() 1268 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode() 1275 int size; in ocfs2_extent_recs_per_inode_with_xattr() local 1279 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1283 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1286 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode_with_xattr() 1291 int size; in ocfs2_extent_recs_per_dx_root() local 1293 size = sb->s_blocksize - in ocfs2_extent_recs_per_dx_root() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_bit.c | 19 xfs_bitmap_empty(uint *map, uint size) in xfs_bitmap_empty() argument 23 for (i = 0; i < size; i++) { in xfs_bitmap_empty() 36 xfs_contig_bits(uint *map, uint size, uint start_bit) in xfs_contig_bits() argument 42 size <<= BIT_TO_WORD_SHIFT; in xfs_contig_bits() 44 ASSERT(start_bit < size); in xfs_contig_bits() 45 size -= start_bit & ~(NBWORD - 1); in xfs_contig_bits() 54 size -= NBWORD; in xfs_contig_bits() 56 while (size) { in xfs_contig_bits() 60 size -= NBWORD; in xfs_contig_bits() 75 int xfs_next_bit(uint *map, uint size, uint start_bit) in xfs_next_bit() argument [all …]
|
/fs/nfsd/ |
D | nfsctl.c | 64 static ssize_t write_filehandle(struct file *file, char *buf, size_t size); 65 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size); 66 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size); 67 static ssize_t write_threads(struct file *file, char *buf, size_t size); 68 static ssize_t write_pool_threads(struct file *file, char *buf, size_t size); 69 static ssize_t write_versions(struct file *file, char *buf, size_t size); 70 static ssize_t write_ports(struct file *file, char *buf, size_t size); 71 static ssize_t write_maxblksize(struct file *file, char *buf, size_t size); 72 static ssize_t write_maxconn(struct file *file, char *buf, size_t size); 74 static ssize_t write_leasetime(struct file *file, char *buf, size_t size); [all …]
|
/fs/afs/ |
D | xattr.c | 27 ssize_t afs_listxattr(struct dentry *dentry, char *buffer, size_t size) in afs_listxattr() argument 29 if (size == 0) in afs_listxattr() 31 if (size < sizeof(afs_xattr_list)) in afs_listxattr() 43 void *buffer, size_t size, int flags) in afs_xattr_get_acl() argument 78 ret = acl->size; in afs_xattr_get_acl() 79 if (size > 0) { in afs_xattr_get_acl() 80 if (acl->size <= size) in afs_xattr_get_acl() 81 memcpy(buffer, acl->data, acl->size); in afs_xattr_get_acl() 101 const void *buffer, size_t size, int flags) in afs_xattr_set_acl() argument 117 acl = kmalloc(sizeof(*acl) + size, GFP_KERNEL); in afs_xattr_set_acl() [all …]
|
/fs/btrfs/ |
D | acl.c | 21 int size; in btrfs_get_acl() local 37 size = btrfs_getxattr(inode, name, NULL, 0); in btrfs_get_acl() 38 if (size > 0) { in btrfs_get_acl() 39 value = kzalloc(size, GFP_KERNEL); in btrfs_get_acl() 42 size = btrfs_getxattr(inode, name, value, size); in btrfs_get_acl() 44 if (size > 0) in btrfs_get_acl() 45 acl = posix_acl_from_xattr(&init_user_ns, value, size); in btrfs_get_acl() 46 else if (size == -ENODATA || size == 0) in btrfs_get_acl() 49 acl = ERR_PTR(size); in btrfs_get_acl() 58 int ret, size = 0; in __btrfs_set_acl() local [all …]
|
D | xattr.c | 24 void *buffer, size_t size) in btrfs_getxattr() argument 50 if (!size) { in btrfs_getxattr() 56 if (btrfs_dir_data_len(leaf, di) > size) { in btrfs_getxattr() 80 const char *name, const void *value, size_t size, int flags) in btrfs_setxattr() argument 91 if (name_len + size > BTRFS_MAX_XATTR_SIZE(root->fs_info)) in btrfs_setxattr() 133 name, name_len, value, size); in btrfs_setxattr() 172 const u32 data_size = sizeof(*di) + name_len + size; in btrfs_setxattr() 177 if (size > old_data_len) { in btrfs_setxattr() 179 (size - old_data_len)) { in btrfs_setxattr() 187 if (size > old_data_len) in btrfs_setxattr() [all …]
|
/fs/proc/ |
D | vmcore.c | 157 int __weak elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size) in elfcorehdr_alloc() argument 189 unsigned long size, pgprot_t prot) in remap_oldmem_pfn_range() argument 192 return remap_pfn_range(vma, from, pfn, size, prot); in remap_oldmem_pfn_range() 208 static int copy_to(void *target, void *src, size_t size, int userbuf) in copy_to() argument 211 if (copy_to_user((char __user *) target, src, size)) in copy_to() 214 memcpy(target, src, size); in copy_to() 220 static int vmcoredd_copy_dumps(void *dst, u64 start, size_t size, int userbuf) in vmcoredd_copy_dumps() argument 230 if (start < offset + dump->size) { in vmcoredd_copy_dumps() 231 tsz = min(offset + (u64)dump->size - start, (u64)size); in vmcoredd_copy_dumps() 238 size -= tsz; in vmcoredd_copy_dumps() [all …]
|
/fs/9p/ |
D | acl.c | 30 ssize_t size; in __v9fs_get_acl() local 34 size = v9fs_fid_xattr_get(fid, name, NULL, 0); in __v9fs_get_acl() 35 if (size > 0) { in __v9fs_get_acl() 36 value = kzalloc(size, GFP_NOFS); in __v9fs_get_acl() 39 size = v9fs_fid_xattr_get(fid, name, value, size); in __v9fs_get_acl() 40 if (size > 0) { in __v9fs_get_acl() 41 acl = posix_acl_from_xattr(&init_user_ns, value, size); in __v9fs_get_acl() 45 } else if (size == -ENODATA || size == 0 || in __v9fs_get_acl() 46 size == -ENOSYS || size == -EOPNOTSUPP) { in __v9fs_get_acl() 121 size_t size; in v9fs_set_acl() local [all …]
|
/fs/hpfs/ |
D | ea.c | 51 static char *get_indirect_ea(struct super_block *s, int ano, secno a, int size) in get_indirect_ea() argument 54 if (!(ret = kmalloc(size + 1, GFP_NOFS))) { in get_indirect_ea() 58 if (hpfs_ea_read(s, a, ano, 0, size, ret)) { in get_indirect_ea() 62 ret[size] = 0; in get_indirect_ea() 67 const char *data, int size) in set_indirect_ea() argument 69 hpfs_ea_write(s, a, ano, 0, size, data); in set_indirect_ea() 75 char *buf, int size) in hpfs_read_ea() argument 87 if (ea_valuelen(ea) >= size) in hpfs_read_ea() 110 if (ea_valuelen(ea) >= size) in hpfs_read_ea() 121 if (ea_len(ea) >= size) in hpfs_read_ea() [all …]
|
/fs/squashfs/ |
D | dir.c | 44 unsigned int size; in get_dir_index_using_offset() local 72 size = le32_to_cpu(dir_index.size) + 1; in get_dir_index_using_offset() 75 if (size > SQUASHFS_NAME_LEN) in get_dir_index_using_offset() 79 &index_offset, size); in get_dir_index_using_offset() 103 unsigned int inode_number, dir_count, size, type; in squashfs_readdir() local 129 size = 1; in squashfs_readdir() 133 size = 2; in squashfs_readdir() 137 if (!dir_emit(ctx, name, size, i_ino, in squashfs_readdir() 141 ctx->pos += size; in squashfs_readdir() 175 size = le16_to_cpu(dire->size) + 1; in squashfs_readdir() [all …]
|
/fs/jfs/ |
D | acl.c | 21 int size; in jfs_get_acl() local 35 size = __jfs_getxattr(inode, ea_name, NULL, 0); in jfs_get_acl() 37 if (size > 0) { in jfs_get_acl() 38 value = kmalloc(size, GFP_KERNEL); in jfs_get_acl() 41 size = __jfs_getxattr(inode, ea_name, value, size); in jfs_get_acl() 44 if (size < 0) { in jfs_get_acl() 45 if (size == -ENODATA) in jfs_get_acl() 48 acl = ERR_PTR(size); in jfs_get_acl() 50 acl = posix_acl_from_xattr(&init_user_ns, value, size); in jfs_get_acl() 61 int size = 0; in __jfs_set_acl() local [all …]
|
/fs/xfs/ |
D | kmem.c | 12 kmem_alloc(size_t size, xfs_km_flags_t flags) in kmem_alloc() argument 18 trace_kmem_alloc(size, flags, _RET_IP_); in kmem_alloc() 21 ptr = kmalloc(size, lflags); in kmem_alloc() 28 (unsigned int)size, __func__, lflags); in kmem_alloc() 42 __kmem_vmalloc(size_t size, xfs_km_flags_t flags) in __kmem_vmalloc() argument 51 ptr = __vmalloc(size, lflags, PAGE_KERNEL); in __kmem_vmalloc() 66 kmem_alloc_io(size_t size, int align_mask, xfs_km_flags_t flags) in kmem_alloc_io() argument 70 trace_kmem_alloc_io(size, flags, _RET_IP_); in kmem_alloc_io() 75 ptr = kmem_alloc(size, flags | KM_MAYFAIL); in kmem_alloc_io() 81 return __kmem_vmalloc(size, flags); in kmem_alloc_io() [all …]
|
/fs/pstore/ |
D | ram_core.c | 36 atomic_t size; member 44 return atomic_read(&prz->buffer->size); in buffer_size() 84 old = atomic_read(&prz->buffer->size); in buffer_size_add() 91 atomic_set(&prz->buffer->size, new); in buffer_size_add() 131 int size = ecc_block_size; in persistent_ram_update_ecc() local 141 size = buffer_end - block; in persistent_ram_update_ecc() 142 persistent_ram_encode_rs8(prz, block, size, par); in persistent_ram_update_ecc() 172 int size = prz->ecc_info.block_size; in persistent_ram_ecc_old() local 173 if (block + size > buffer->data + prz->buffer_size) in persistent_ram_ecc_old() 174 size = buffer->data + prz->buffer_size - block; in persistent_ram_ecc_old() [all …]
|
D | platform.c | 90 int (*zbufsize)(size_t size); 175 static int zbufsize_deflate(size_t size) in zbufsize_deflate() argument 179 switch (size) { in zbufsize_deflate() 199 return (size * 100) / cmpr; in zbufsize_deflate() 204 static int zbufsize_lzo(size_t size) in zbufsize_lzo() argument 206 return lzo1x_worst_compress(size); in zbufsize_lzo() 211 static int zbufsize_lz4(size_t size) in zbufsize_lz4() argument 213 return LZ4_compressBound(size); in zbufsize_lz4() 218 static int zbufsize_842(size_t size) in zbufsize_842() argument 220 return size; in zbufsize_842() [all …]
|
/fs/ceph/ |
D | xattr.c | 37 size_t size); 57 size_t size) in ceph_vxattrcb_layout() argument 92 if (size >= total_len) { in ceph_vxattrcb_layout() 119 static int ceph_fmt_xattr(char *val, size_t size, const char *fmt, ...) in ceph_fmt_xattr() argument 126 ret = vsnprintf(buf, size ? sizeof(buf) : 0, fmt, args); in ceph_fmt_xattr() 130 if (size && ret + 1 > sizeof(buf)) { in ceph_fmt_xattr() 135 if (ret <= size) in ceph_fmt_xattr() 141 char *val, size_t size) in ceph_vxattrcb_layout_stripe_unit() argument 143 return ceph_fmt_xattr(val, size, "%u", ci->i_layout.stripe_unit); in ceph_vxattrcb_layout_stripe_unit() 147 char *val, size_t size) in ceph_vxattrcb_layout_stripe_count() argument [all …]
|
/fs/reiserfs/ |
D | xattr_acl.c | 26 int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; in reiserfs_set_acl() local 36 reiserfs_xattr_nblocks(inode, size) * 2; in reiserfs_set_acl() 65 static struct posix_acl *reiserfs_posix_acl_from_disk(const void *value, size_t size) in reiserfs_posix_acl_from_disk() argument 67 const char *end = (char *)value + size; in reiserfs_posix_acl_from_disk() 73 if (size < sizeof(reiserfs_acl_header)) in reiserfs_posix_acl_from_disk() 79 count = reiserfs_acl_count(size); in reiserfs_posix_acl_from_disk() 135 static void *reiserfs_posix_acl_to_disk(const struct posix_acl *acl, size_t * size) in reiserfs_posix_acl_to_disk() argument 141 *size = reiserfs_acl_size(acl->a_count); in reiserfs_posix_acl_to_disk() 195 int size; in reiserfs_get_acl() local 209 size = reiserfs_xattr_get(inode, name, NULL, 0); in reiserfs_get_acl() [all …]
|
/fs/hfsplus/ |
D | unicode.c | 259 int size = HFSPLUS_SB(sb)->nls->char2uni(astr, len, uc); in asc2unichar() local 260 if (size <= 0) { in asc2unichar() 262 size = 1; in asc2unichar() 272 return size; in asc2unichar() 276 static u16 *hfsplus_decompose_nonhangul(wchar_t uc, int *size) in hfsplus_decompose_nonhangul() argument 293 *size = off & 3; in hfsplus_decompose_nonhangul() 294 if (*size == 0) in hfsplus_decompose_nonhangul() 332 static u16 *decompose_unichar(wchar_t uc, int *size, u16 *hangul_buffer) in decompose_unichar() argument 338 *size = hfsplus_try_decompose_hangul(uc, result); in decompose_unichar() 339 if (*size == 0) in decompose_unichar() [all …]
|