/fs/fuse/ |
D | xattr.c | 15 size_t size, int flags, unsigned int extra_flags) in fuse_setxattr() argument 26 inarg.size = size; in fuse_setxattr() 33 args.in_args[0].size = fm->fc->setxattr_ext ? in fuse_setxattr() 36 args.in_args[1].size = strlen(name) + 1; in fuse_setxattr() 38 args.in_args[2].size = size; in fuse_setxattr() 52 size_t size) in fuse_getxattr() argument 64 inarg.size = size; in fuse_getxattr() 68 args.in_args[0].size = sizeof(inarg); in fuse_getxattr() 70 args.in_args[1].size = strlen(name) + 1; in fuse_getxattr() 74 if (size) { in fuse_getxattr() [all …]
|
D | acl.c | 17 int size; in fuse_get_acl() local 41 size = fuse_getxattr(inode, name, value, PAGE_SIZE); in fuse_get_acl() 42 if (size > 0) in fuse_get_acl() 43 acl = posix_acl_from_xattr(fc->user_ns, value, size); in fuse_get_acl() 44 else if ((size == 0) || (size == -ENODATA) || in fuse_get_acl() 45 (size == -EOPNOTSUPP && fc->no_getxattr)) in fuse_get_acl() 47 else if (size == -ERANGE) in fuse_get_acl() 50 acl = ERR_PTR(size); in fuse_get_acl() 85 size_t size = posix_acl_xattr_size(acl->a_count); in fuse_set_acl() local 88 if (size > PAGE_SIZE) in fuse_set_acl() [all …]
|
/fs/ |
D | xattr.c | 171 size_t size, int flags) in __vfs_setxattr() argument 180 if (size == 0) in __vfs_setxattr() 183 size, flags); in __vfs_setxattr() 206 const void *value, size_t size, int flags) in __vfs_setxattr_noperm() argument 217 size, flags); in __vfs_setxattr_noperm() 221 size, flags); in __vfs_setxattr_noperm() 234 size, flags); in __vfs_setxattr_noperm() 258 const char *name, const void *value, size_t size, in __vfs_setxattr_locked() argument 268 error = security_inode_setxattr(mnt_userns, dentry, name, value, size, in __vfs_setxattr_locked() 278 size, flags); in __vfs_setxattr_locked() [all …]
|
D | seq_file.c | 30 m->count = m->size; in seq_set_overflow() 33 static void *seq_buf_alloc(unsigned long size) in seq_buf_alloc() argument 35 if (unlikely(size > MAX_RW_COUNT)) in seq_buf_alloc() 38 return kvmalloc(size, GFP_KERNEL_ACCOUNT); in seq_buf_alloc() 102 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in traverse() 138 m->buf = seq_buf_alloc(m->size <<= 1); in traverse() 151 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument 153 struct iovec iov = { .iov_base = buf, .iov_len = size}; in seq_read() 159 iov_iter_init(&iter, ITER_DEST, &iov, 1, size); in seq_read() 210 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in seq_read_iter() [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 39 *size = bdev_nr_sectors(sb->s_bdev); in hfs_get_last_session() 79 int off2, len, size, sect; in hfs_mdb_get() local 85 size = sb_min_blocksize(sb, HFS_SECTOR_SIZE); in hfs_mdb_get() 86 if (!size) in hfs_mdb_get() 108 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); in hfs_mdb_get() 109 if (!size || (size & (HFS_SECTOR_SIZE - 1))) { in hfs_mdb_get() 110 pr_err("bad allocation block size %d\n", size); in hfs_mdb_get() 114 size = min(HFS_SB(sb)->alloc_blksz, (u32)PAGE_SIZE); in hfs_mdb_get() 116 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 | 1054 #define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \ argument 1261 int size; in ocfs2_extent_recs_per_inode() local 1263 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode() 1266 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode() 1273 int size; in ocfs2_extent_recs_per_inode_with_xattr() local 1277 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1281 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1284 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode_with_xattr() 1289 int size; in ocfs2_extent_recs_per_dx_root() local 1291 size = sb->s_blocksize - in ocfs2_extent_recs_per_dx_root() [all …]
|
/fs/ntfs3/ |
D | xattr.c | 25 return ea->size ? le32_to_cpu(ea->size) in unpacked_ea_size() 80 u32 size, off, ea_size; in ntfs_read_ea() local 100 size = le32_to_cpu((*info)->size); in ntfs_read_ea() 101 if (size > sbi->ea_max_size) { in ntfs_read_ea() 111 if (!size) { in ntfs_read_ea() 117 ea_p = kmalloc(size_add(size, add_bytes), GFP_NOFS); in ntfs_read_ea() 126 err = attr_load_runs_range(ni, ATTR_EA, NULL, 0, &run, 0, size); in ntfs_read_ea() 128 err = ntfs_read_run_nb(sbi, &run, 0, ea_p, size, NULL); in ntfs_read_ea() 134 void *p = resident_data_ex(attr_ea, size); in ntfs_read_ea() 138 memcpy(ea_p, p, size); in ntfs_read_ea() [all …]
|
D | attrlist.c | 22 if (!le || !ni->attr_list.le || !ni->attr_list.size) in al_is_valid_le() 25 return PtrOffset(ni->attr_list.le, le) + le16_to_cpu(le->size) <= in al_is_valid_le() 26 ni->attr_list.size; in al_is_valid_le() 34 ni->attr_list.size = 0; in al_destroy() 50 if (ni->attr_list.size) in ntfs_load_attr_list() 72 if (run_off > le32_to_cpu(attr->size)) { in ntfs_load_attr_list() 80 le32_to_cpu(attr->size) - run_off); in ntfs_load_attr_list() 106 ni->attr_list.size = lsize; in ntfs_load_attr_list() 135 sz = le16_to_cpu(le->size); in al_enumerate() 145 if (off + le_min_size > ni->attr_list.size) { in al_enumerate() [all …]
|
/fs/nfsd/ |
D | nfsctl.c | 67 static ssize_t write_filehandle(struct file *file, char *buf, size_t size); 68 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size); 69 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size); 70 static ssize_t write_threads(struct file *file, char *buf, size_t size); 71 static ssize_t write_pool_threads(struct file *file, char *buf, size_t size); 72 static ssize_t write_versions(struct file *file, char *buf, size_t size); 73 static ssize_t write_ports(struct file *file, char *buf, size_t size); 74 static ssize_t write_maxblksize(struct file *file, char *buf, size_t size); 75 static ssize_t write_maxconn(struct file *file, char *buf, size_t size); 77 static ssize_t write_leasetime(struct file *file, char *buf, size_t size); [all …]
|
/fs/xfs/libxfs/ |
D | xfs_bit.c | 20 xfs_bitmap_empty(uint *map, uint size) in xfs_bitmap_empty() argument 24 for (i = 0; i < size; i++) { in xfs_bitmap_empty() 37 xfs_contig_bits(uint *map, uint size, uint start_bit) in xfs_contig_bits() argument 43 size <<= BIT_TO_WORD_SHIFT; in xfs_contig_bits() 45 ASSERT(start_bit < size); in xfs_contig_bits() 46 size -= start_bit & ~(NBWORD - 1); in xfs_contig_bits() 55 size -= NBWORD; in xfs_contig_bits() 57 while (size) { in xfs_contig_bits() 61 size -= NBWORD; in xfs_contig_bits() 76 int xfs_next_bit(uint *map, uint size, uint start_bit) in xfs_next_bit() argument [all …]
|
/fs/btrfs/ |
D | acl.c | 21 int size; in btrfs_get_acl() local 40 size = btrfs_getxattr(inode, name, NULL, 0); in btrfs_get_acl() 41 if (size > 0) { in btrfs_get_acl() 42 value = kzalloc(size, GFP_KERNEL); in btrfs_get_acl() 45 size = btrfs_getxattr(inode, name, value, size); in btrfs_get_acl() 47 if (size > 0) in btrfs_get_acl() 48 acl = posix_acl_from_xattr(&init_user_ns, value, size); in btrfs_get_acl() 49 else if (size == -ENODATA || size == 0) in btrfs_get_acl() 52 acl = ERR_PTR(size); in btrfs_get_acl() 61 int ret, size = 0; in __btrfs_set_acl() local [all …]
|
D | struct-funcs.c | 11 const void *ptr, unsigned off, int size) in check_setget_bounds() argument 15 if (unlikely(member_offset + size > eb->len)) { in check_setget_bounds() 19 (unsigned long)ptr, eb->start, member_offset, size); in check_setget_bounds() 58 const int size = sizeof(u##bits); \ 64 ASSERT(check_setget_bounds(token->eb, ptr, off, size)); \ 66 member_offset + size <= token->offset + PAGE_SIZE) { \ 71 if (INLINE_EXTENT_BUFFER_PAGES == 1 || oip + size <= PAGE_SIZE ) \ 77 memcpy(lebytes + part, token->kaddr, size - part); \ 87 const int size = sizeof(u##bits); \ 91 ASSERT(check_setget_bounds(eb, ptr, off, size)); \ [all …]
|
/fs/afs/ |
D | xattr.c | 39 void *buffer, size_t size) in afs_xattr_get_acl() argument 60 ret = acl->size; in afs_xattr_get_acl() 61 if (size > 0) { in afs_xattr_get_acl() 62 if (acl->size <= size) in afs_xattr_get_acl() 63 memcpy(buffer, acl->data, acl->size); in afs_xattr_get_acl() 74 const void *buffer, size_t size) in afs_make_acl() argument 78 acl = kmalloc(sizeof(*acl) + size, GFP_KERNEL); in afs_make_acl() 84 acl->size = size; in afs_make_acl() 85 memcpy(acl->data, buffer, size); in afs_make_acl() 103 const void *buffer, size_t size, int flags) in afs_xattr_set_acl() argument [all …]
|
/fs/proc/ |
D | vmcore.c | 183 int __weak elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size) in elfcorehdr_alloc() argument 226 unsigned long size, pgprot_t prot) in remap_oldmem_pfn_range() argument 229 return remap_pfn_range(vma, from, pfn, size, prot); in remap_oldmem_pfn_range() 242 static int vmcoredd_copy_dumps(struct iov_iter *iter, u64 start, size_t size) in vmcoredd_copy_dumps() argument 252 if (start < offset + dump->size) { in vmcoredd_copy_dumps() 253 tsz = min(offset + (u64)dump->size - start, (u64)size); in vmcoredd_copy_dumps() 260 size -= tsz; in vmcoredd_copy_dumps() 264 if (!size) in vmcoredd_copy_dumps() 267 offset += dump->size; in vmcoredd_copy_dumps() 277 u64 start, size_t size) in vmcoredd_mmap_dumps() argument [all …]
|
/fs/9p/ |
D | acl.c | 22 ssize_t size; in __v9fs_get_acl() local 26 size = v9fs_fid_xattr_get(fid, name, NULL, 0); in __v9fs_get_acl() 27 if (size > 0) { in __v9fs_get_acl() 28 value = kzalloc(size, GFP_NOFS); in __v9fs_get_acl() 31 size = v9fs_fid_xattr_get(fid, name, value, size); in __v9fs_get_acl() 32 if (size > 0) { in __v9fs_get_acl() 33 acl = posix_acl_from_xattr(&init_user_ns, value, size); in __v9fs_get_acl() 37 } else if (size == -ENODATA || size == 0 || in __v9fs_get_acl() 38 size == -ENOSYS || size == -EOPNOTSUPP) { in __v9fs_get_acl() 116 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/ceph/ |
D | xattr.c | 37 size_t size); 58 size_t size) in ceph_vxattrcb_layout() argument 93 if (size >= total_len) { in ceph_vxattrcb_layout() 121 int ceph_fmt_xattr(char *val, size_t size, const char *fmt, ...) in ceph_fmt_xattr() argument 128 ret = vsnprintf(buf, size ? sizeof(buf) : 0, fmt, args); in ceph_fmt_xattr() 132 if (size && ret + 1 > sizeof(buf)) { in ceph_fmt_xattr() 137 if (ret <= size) in ceph_fmt_xattr() 143 char *val, size_t size) in ceph_vxattrcb_layout_stripe_unit() argument 145 return ceph_fmt_xattr(val, size, "%u", ci->i_layout.stripe_unit); in ceph_vxattrcb_layout_stripe_unit() 149 char *val, size_t size) in ceph_vxattrcb_layout_stripe_count() argument [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 | 96 int (*zbufsize)(size_t size); 170 static int zbufsize_deflate(size_t size) in zbufsize_deflate() argument 174 switch (size) { in zbufsize_deflate() 194 return (size * 100) / cmpr; in zbufsize_deflate() 199 static int zbufsize_lzo(size_t size) in zbufsize_lzo() argument 201 return lzo1x_worst_compress(size); in zbufsize_lzo() 206 static int zbufsize_lz4(size_t size) in zbufsize_lz4() argument 208 return LZ4_compressBound(size); in zbufsize_lz4() 213 static int zbufsize_842(size_t size) in zbufsize_842() argument 215 return size; in zbufsize_842() [all …]
|
/fs/jfs/ |
D | acl.c | 21 int size; in jfs_get_acl() local 38 size = __jfs_getxattr(inode, ea_name, NULL, 0); in jfs_get_acl() 40 if (size > 0) { in jfs_get_acl() 41 value = kmalloc(size, GFP_KERNEL); in jfs_get_acl() 44 size = __jfs_getxattr(inode, ea_name, value, size); in jfs_get_acl() 47 if (size < 0) { in jfs_get_acl() 48 if (size == -ENODATA) in jfs_get_acl() 51 acl = ERR_PTR(size); in jfs_get_acl() 53 acl = posix_acl_from_xattr(&init_user_ns, value, size); in jfs_get_acl() 64 int size = 0; in __jfs_set_acl() local [all …]
|
D | xattr.c | 144 int size, dxd_t * ea) in ea_write_inline() argument 152 if (ealist && size > sizeof (struct jfs_ea_list)) { in ea_write_inline() 153 assert(size <= sizeof (ji->i_inline_ea)); in ea_write_inline() 162 DXDsize(ea, size); in ea_write_inline() 165 memcpy(ji->i_inline_ea, ealist, size); in ea_write_inline() 201 static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, in ea_write() argument 219 if (!ealist || size <= sizeof (ji->i_inline_ea)) { in ea_write() 220 if (!ea_write_inline(ip, ealist, size, ea)) in ea_write() 225 nblocks = (size + (sb->s_blocksize - 1)) >> sb->s_blocksize_bits; in ea_write() 245 nbytes = size; in ea_write() [all …]
|