Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 160) sorted by relevance

1234567

/fs/configfs/
Dfile.c58 static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer) in fill_read_buffer() argument
63 if (!buffer->page) in fill_read_buffer()
64 buffer->page = (char *) get_zeroed_page(GFP_KERNEL); in fill_read_buffer()
65 if (!buffer->page) in fill_read_buffer()
70 count = buffer->attr->show(buffer->item, buffer->page); in fill_read_buffer()
77 buffer->needs_read_fill = 0; in fill_read_buffer()
78 buffer->count = count; in fill_read_buffer()
104 struct configfs_buffer *buffer = file->private_data; in configfs_read_file() local
107 mutex_lock(&buffer->mutex); in configfs_read_file()
108 if (buffer->needs_read_fill) { in configfs_read_file()
[all …]
/fs/pstore/
Dram_core.c44 return atomic_read(&prz->buffer->size); in buffer_size()
49 return atomic_read(&prz->buffer->start); in buffer_start()
62 old = atomic_read(&prz->buffer->start); in buffer_start_add()
66 atomic_set(&prz->buffer->start, new); in buffer_start_add()
84 old = atomic_read(&prz->buffer->size); in buffer_size_add()
91 atomic_set(&prz->buffer->size, new); in buffer_size_add()
125 struct persistent_ram_buffer *buffer = prz->buffer; in persistent_ram_update_ecc() local
126 uint8_t *buffer_end = buffer->data + prz->buffer_size; in persistent_ram_update_ecc()
136 block = buffer->data + (start & ~(ecc_block_size - 1)); in persistent_ram_update_ecc()
145 } while (block < buffer->data + start + count); in persistent_ram_update_ecc()
[all …]
/fs/xfs/libxfs/
Dxfs_cksum.h14 xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset) in xfs_start_cksum_safe() argument
20 crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset); in xfs_start_cksum_safe()
26 return crc32c(crc, &buffer[cksum_offset + sizeof(__be32)], in xfs_start_cksum_safe()
35 xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset) in xfs_start_cksum_update() argument
38 *(__le32 *)(buffer + cksum_offset) = 0; in xfs_start_cksum_update()
41 return crc32c(XFS_CRC_SEED, buffer, length); in xfs_start_cksum_update()
64 xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset) in xfs_update_cksum() argument
66 uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset); in xfs_update_cksum()
68 *(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc); in xfs_update_cksum()
75 xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset) in xfs_verify_cksum() argument
[all …]
/fs/
Dd_path.c11 static int prepend(char **buffer, int *buflen, const char *str, int namelen) in prepend() argument
16 *buffer -= namelen; in prepend()
17 memcpy(*buffer, str, namelen); in prepend()
38 static int prepend_name(char **buffer, int *buflen, const struct qstr *name) in prepend_name() argument
47 p = *buffer -= dlen + 1; in prepend_name()
77 char **buffer, int *buflen) in prepend_path() argument
93 bptr = *buffer; in prepend_path()
107 bptr = *buffer; in prepend_path()
149 if (error >= 0 && bptr == *buffer) { in prepend_path()
155 *buffer = bptr; in prepend_path()
[all …]
Dxattr.c236 void *buffer = NULL; in xattr_getsecurity() local
240 len = security_inode_getsecurity(inode, name, &buffer, false); in xattr_getsecurity()
244 len = security_inode_getsecurity(inode, name, &buffer, true); in xattr_getsecurity()
251 memcpy(value, buffer, len); in xattr_getsecurity()
253 kfree(buffer); in xattr_getsecurity()
750 generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) in generic_listxattr() argument
755 if (!buffer) { in generic_listxattr()
763 char *buf = buffer; in generic_listxattr()
777 size = buf - buffer; in generic_listxattr()
833 void *buffer, size_t size) in simple_xattr_get() argument
[all …]
/fs/squashfs/
Dxattr.c26 ssize_t squashfs_listxattr(struct dentry *d, char *buffer, in squashfs_listxattr() argument
61 if (buffer) { in squashfs_listxattr()
66 memcpy(buffer, prefix, prefix_size); in squashfs_listxattr()
67 buffer += prefix_size; in squashfs_listxattr()
69 err = squashfs_read_metadata(sb, buffer, &start, in squashfs_listxattr()
73 if (buffer) { in squashfs_listxattr()
74 buffer[name_size] = '\0'; in squashfs_listxattr()
75 buffer += name_size + 1; in squashfs_listxattr()
106 const char *name, void *buffer, size_t buffer_size) in squashfs_xattr_get() argument
172 if (buffer) { in squashfs_xattr_get()
[all …]
Dcache.c293 int squashfs_copy_data(void *buffer, struct squashfs_cache_entry *entry, in squashfs_copy_data() argument
300 else if (buffer == NULL) in squashfs_copy_data()
310 memcpy(buffer, buff, remaining); in squashfs_copy_data()
315 memcpy(buffer, buff, bytes); in squashfs_copy_data()
316 buffer += bytes; in squashfs_copy_data()
331 int squashfs_read_metadata(struct super_block *sb, void *buffer, in squashfs_read_metadata() argument
353 bytes = squashfs_copy_data(buffer, entry, *offset, length); in squashfs_read_metadata()
354 if (buffer) in squashfs_read_metadata()
355 buffer += bytes; in squashfs_read_metadata()
410 void *table, *buffer, **data; in squashfs_read_table() local
[all …]
Ddecompressor.c91 void *buffer = NULL, *comp_opts; in get_comp_opts() local
99 buffer = kmalloc(PAGE_SIZE, GFP_KERNEL); in get_comp_opts()
100 if (buffer == NULL) { in get_comp_opts()
105 actor = squashfs_page_actor_init(&buffer, 1, 0); in get_comp_opts()
120 comp_opts = squashfs_comp_opts(msblk, buffer, length); in get_comp_opts()
124 kfree(buffer); in get_comp_opts()
Dfile_cache.c24 struct squashfs_cache_entry *buffer = squashfs_get_datablock(i->i_sb, in squashfs_readpage_block() local
26 int res = buffer->error; in squashfs_readpage_block()
32 squashfs_copy_cache(page, buffer, expected, 0); in squashfs_readpage_block()
34 squashfs_cache_put(buffer); in squashfs_readpage_block()
Dpage_actor.c25 return actor->buffer[0]; in cache_first_page()
33 return actor->buffer[actor->next_page++]; in cache_next_page()
41 struct squashfs_page_actor *squashfs_page_actor_init(void **buffer, in squashfs_page_actor_init() argument
50 actor->buffer = buffer; in squashfs_page_actor_init()
/fs/afs/
Dxattr.c27 ssize_t afs_listxattr(struct dentry *dentry, char *buffer, size_t size) in afs_listxattr() argument
33 memcpy(buffer, afs_xattr_list, sizeof(afs_xattr_list)); in afs_listxattr()
43 void *buffer, size_t size, int flags) in afs_xattr_get_acl() argument
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
128 memcpy(acl->data, buffer, size); in afs_xattr_set_acl()
166 void *buffer, size_t size, int flags) in afs_xattr_get_yfs() argument
252 memcpy(buffer, data, dsize); in afs_xattr_get_yfs()
271 const void *buffer, size_t size, int flags) in afs_xattr_set_yfs() argument
293 memcpy(acl->data, buffer, size); in afs_xattr_set_yfs()
[all …]
Dcmservice.c242 kfree(call->buffer); in afs_cm_destructor()
243 call->buffer = NULL; in afs_cm_destructor()
300 call->buffer = kmalloc(array3_size(call->count, 3, 4), in afs_deliver_cb_callback()
302 if (!call->buffer) in afs_deliver_cb_callback()
322 bp = call->buffer; in afs_deliver_cb_callback()
422 call->buffer = kmalloc_array(11, sizeof(__be32), GFP_KERNEL); in afs_deliver_cb_init_call_back_state3()
423 if (!call->buffer) in afs_deliver_cb_init_call_back_state3()
443 b = call->buffer; in afs_deliver_cb_init_call_back_state3()
534 call->buffer = kmalloc_array(11, sizeof(__be32), GFP_KERNEL); in afs_deliver_cb_probe_uuid()
535 if (!call->buffer) in afs_deliver_cb_probe_uuid()
[all …]
/fs/xfs/
Dxfs_ioctl32.c178 struct xfs_bstat *buffer = &bs1; in xfs_fsbulkstat_one_fmt_compat() local
182 if (put_user(buffer->bs_ino, &p32->bs_ino) || in xfs_fsbulkstat_one_fmt_compat()
183 put_user(buffer->bs_mode, &p32->bs_mode) || in xfs_fsbulkstat_one_fmt_compat()
184 put_user(buffer->bs_nlink, &p32->bs_nlink) || in xfs_fsbulkstat_one_fmt_compat()
185 put_user(buffer->bs_uid, &p32->bs_uid) || in xfs_fsbulkstat_one_fmt_compat()
186 put_user(buffer->bs_gid, &p32->bs_gid) || in xfs_fsbulkstat_one_fmt_compat()
187 put_user(buffer->bs_rdev, &p32->bs_rdev) || in xfs_fsbulkstat_one_fmt_compat()
188 put_user(buffer->bs_blksize, &p32->bs_blksize) || in xfs_fsbulkstat_one_fmt_compat()
189 put_user(buffer->bs_size, &p32->bs_size) || in xfs_fsbulkstat_one_fmt_compat()
190 xfs_bstime_store_compat(&p32->bs_atime, &buffer->bs_atime) || in xfs_fsbulkstat_one_fmt_compat()
[all …]
/fs/cifs/
Dmisc.c243 header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , in header_assemble() argument
247 char *temp = (char *) buffer; in header_assemble()
251 buffer->smb_buf_length = cpu_to_be32( in header_assemble()
256 buffer->Protocol[0] = 0xFF; in header_assemble()
257 buffer->Protocol[1] = 'S'; in header_assemble()
258 buffer->Protocol[2] = 'M'; in header_assemble()
259 buffer->Protocol[3] = 'B'; in header_assemble()
260 buffer->Command = smb_command; in header_assemble()
261 buffer->Flags = 0x00; /* case sensitive */ in header_assemble()
262 buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES; in header_assemble()
[all …]
/fs/9p/
Dxattr.c26 void *buffer, size_t buffer_size) in v9fs_fid_xattr_get() argument
31 struct kvec kvec = {.iov_base = buffer, .iov_len = buffer_size}; in v9fs_fid_xattr_get()
71 void *buffer, size_t buffer_size) in v9fs_xattr_get() argument
81 return v9fs_fid_xattr_get(fid, name, buffer, buffer_size); in v9fs_xattr_get()
135 ssize_t v9fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) in v9fs_listxattr() argument
137 return v9fs_xattr_get(dentry, NULL, buffer, buffer_size); in v9fs_listxattr()
142 const char *name, void *buffer, size_t size, in v9fs_xattr_handler_get() argument
147 return v9fs_xattr_get(dentry, full_name, buffer, size); in v9fs_xattr_handler_get()
Dacl.c122 void *buffer; in v9fs_set_acl() local
128 buffer = kmalloc(size, GFP_KERNEL); in v9fs_set_acl()
129 if (!buffer) in v9fs_set_acl()
131 retval = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_set_acl()
144 retval = v9fs_fid_xattr_set(fid, name, buffer, size, 0); in v9fs_set_acl()
146 kfree(buffer); in v9fs_set_acl()
217 const char *name, void *buffer, size_t size, in v9fs_xattr_get_acl() argument
229 return v9fs_xattr_get(dentry, handler->name, buffer, size); in v9fs_xattr_get_acl()
236 error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_xattr_get_acl()
/fs/orangefs/
Dxattr.c94 void *buffer, size_t size) in orangefs_inode_getxattr() argument
141 memcpy(buffer, cx->val, cx->length); in orangefs_inode_getxattr()
142 memset(buffer + cx->length, 0, size - cx->length); in orangefs_inode_getxattr()
206 memcpy(buffer, new_op->downcall.resp.getxattr.val, length); in orangefs_inode_getxattr()
207 memset(buffer + length, 0, size - length); in orangefs_inode_getxattr()
222 memcpy(cx->val, buffer, length); in orangefs_inode_getxattr()
229 memcpy(cx->val, buffer, length); in orangefs_inode_getxattr()
406 ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size) in orangefs_listxattr() argument
419 if (size > 0 && !buffer) { in orangefs_listxattr()
429 if (buffer && size > 0) in orangefs_listxattr()
[all …]
/fs/proc/
Dkcore.c314 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument
356 if (copy_to_user(buffer, (char *)&ehdr + *fpos, tsz)) { in read_kcore()
361 buffer += tsz; in read_kcore()
401 if (copy_to_user(buffer, (char *)phdrs + *fpos - phdrs_offset, in read_kcore()
409 buffer += tsz; in read_kcore()
451 if (copy_to_user(buffer, notes + *fpos - notes_offset, tsz)) { in read_kcore()
458 buffer += tsz; in read_kcore()
486 if (clear_user(buffer, tsz)) { in read_kcore()
492 if (clear_user(buffer, tsz)) { in read_kcore()
499 if (copy_to_user(buffer, buf, tsz)) { in read_kcore()
[all …]
/fs/adfs/
Ddir_f.c237 int thissize, buffer, offset; in __adfs_dir_get() local
239 buffer = pos >> sb->s_blocksize_bits; in __adfs_dir_get()
241 if (buffer > dir->nr_buffers) in __adfs_dir_get()
249 memcpy(&de, dir->bh[buffer]->b_data + offset, thissize); in __adfs_dir_get()
251 memcpy(((char *)&de) + thissize, dir->bh[buffer + 1]->b_data, in __adfs_dir_get()
267 int thissize, buffer, offset; in __adfs_dir_put() local
269 buffer = pos >> sb->s_blocksize_bits; in __adfs_dir_put()
271 if (buffer > dir->nr_buffers) in __adfs_dir_put()
282 memcpy(&de, dir->bh[buffer]->b_data + offset, thissize); in __adfs_dir_put()
284 memcpy(((char *)&de) + thissize, dir->bh[buffer + 1]->b_data, in __adfs_dir_put()
[all …]
/fs/erofs/
Dxattr.c319 char *buffer; member
348 return !it->buffer ? 1 : err; in xattr_checkbuffer()
357 memcpy(it->buffer + processed, buf, len); in xattr_copyvalue()
435 void *buffer, size_t buffer_size) in erofs_getxattr() argument
454 it.buffer = buffer; in erofs_getxattr()
466 const char *name, void *buffer, size_t size, in erofs_xattr_generic_get() argument
486 return erofs_getxattr(inode, handler->flags, name, buffer, size); in erofs_xattr_generic_get()
528 char *buffer; member
549 if (!it->buffer) { in xattr_entrylist()
558 memcpy(it->buffer + it->buffer_ofs, prefix, prefix_len); in xattr_entrylist()
[all …]
/fs/f2fs/
Dxattr.c28 const char *name, void *buffer, size_t size, int flags) in f2fs_xattr_generic_get() argument
44 buffer, size, NULL); in f2fs_xattr_generic_get()
83 const char *name, void *buffer, size_t size, int flags) in f2fs_xattr_advise_get() argument
85 if (buffer) in f2fs_xattr_advise_get()
86 *((char *)buffer) = F2FS_I(inode)->i_advise; in f2fs_xattr_advise_get()
495 void *buffer, size_t buffer_size, struct page *ipage) in f2fs_getxattr() argument
519 if (buffer && size > buffer_size) { in f2fs_getxattr()
524 if (buffer) { in f2fs_getxattr()
531 memcpy(buffer, pval, size); in f2fs_getxattr()
539 ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) in f2fs_listxattr() argument
[all …]
/fs/jffs2/
Dxattr_user.c21 const char *name, void *buffer, size_t size, in jffs2_user_getxattr() argument
25 name, buffer, size); in jffs2_user_getxattr()
30 const char *name, const void *buffer, in jffs2_user_setxattr() argument
34 name, buffer, size, flags); in jffs2_user_setxattr()
/fs/hfsplus/
Dxattr_user.c17 const char *name, void *buffer, size_t size, in hfsplus_user_getxattr() argument
21 return hfsplus_getxattr(inode, name, buffer, size, in hfsplus_user_getxattr()
27 const char *name, const void *buffer, in hfsplus_user_setxattr() argument
30 return hfsplus_setxattr(inode, name, buffer, size, flags, in hfsplus_user_setxattr()
Dxattr_trusted.c17 const char *name, void *buffer, in hfsplus_trusted_getxattr() argument
20 return hfsplus_getxattr(inode, name, buffer, size, in hfsplus_trusted_getxattr()
27 const char *name, const void *buffer, in hfsplus_trusted_setxattr() argument
30 return hfsplus_setxattr(inode, name, buffer, size, flags, in hfsplus_trusted_setxattr()
/fs/btrfs/
Dxattr.c24 void *buffer, size_t size) in btrfs_getxattr() argument
70 read_extent_buffer(leaf, buffer, data_ptr, in btrfs_getxattr()
249 ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) in btrfs_listxattr() argument
329 if (!buffer || (name_len + 1) > size_left) { in btrfs_listxattr()
334 read_extent_buffer(leaf, buffer, name_ptr, name_len); in btrfs_listxattr()
335 buffer[name_len] = '\0'; in btrfs_listxattr()
338 buffer += name_len + 1; in btrfs_listxattr()
356 const char *name, void *buffer, size_t size, in btrfs_xattr_handler_get() argument
360 return btrfs_getxattr(inode, name, buffer, size); in btrfs_xattr_handler_get()
365 const char *name, const void *buffer, in btrfs_xattr_handler_set() argument
[all …]

1234567