Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 166) 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 …]
Dzone.c82 struct psz_buffer *buffer; member
162 return atomic_read(&zone->buffer->datalen); in buffer_datalen()
167 return atomic_read(&zone->buffer->start); in buffer_start()
178 if (!buf || !zone || !zone->buffer) in psz_zone_read_buffer()
183 memcpy(buf, zone->buffer->data + off, len); in psz_zone_read_buffer()
213 memcpy(zone->buffer->data + off, buf, wlen); in psz_zone_write()
214 atomic_set(&zone->buffer->datalen, wlen + off); in psz_zone_write()
231 wcnt = writeop((const char *)zone->buffer->data + off, wlen, in psz_zone_write()
232 zone->off + sizeof(*zone->buffer) + off); in psz_zone_write()
238 wcnt = writeop((const char *)zone->buffer, wlen, zone->off); in psz_zone_write()
[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()
109 bptr = *buffer; in prepend_path()
153 if (error >= 0 && bptr == *buffer) { in prepend_path()
159 *buffer = bptr; in prepend_path()
[all …]
/fs/afs/
Dxattr.c39 void *buffer, size_t size, int flags) in afs_xattr_get_acl() argument
63 memcpy(buffer, acl->data, acl->size); in afs_xattr_get_acl()
74 const void *buffer, size_t size) in afs_make_acl() argument
85 memcpy(acl->data, buffer, size); in afs_make_acl()
102 const void *buffer, size_t size, int flags) in afs_xattr_set_acl() argument
115 if (!afs_make_acl(op, buffer, size)) in afs_xattr_set_acl()
140 void *buffer, size_t size, int flags) in afs_xattr_get_yfs() argument
206 memcpy(buffer, data, dsize); in afs_xattr_get_yfs()
232 const void *buffer, size_t size, int flags) in afs_xattr_set_yfs() argument
247 if (!afs_make_acl(op, buffer, size)) in afs_xattr_set_yfs()
[all …]
Dcmservice.c186 kfree(call->buffer); in afs_cm_destructor()
187 call->buffer = NULL; in afs_cm_destructor()
256 call->buffer = kmalloc(array3_size(call->count, 3, 4), in afs_deliver_cb_callback()
258 if (!call->buffer) in afs_deliver_cb_callback()
278 bp = call->buffer; in afs_deliver_cb_callback()
377 call->buffer = kmalloc_array(11, sizeof(__be32), GFP_KERNEL); in afs_deliver_cb_init_call_back_state3()
378 if (!call->buffer) in afs_deliver_cb_init_call_back_state3()
398 b = call->buffer; in afs_deliver_cb_init_call_back_state3()
489 call->buffer = kmalloc_array(11, sizeof(__be32), GFP_KERNEL); in afs_deliver_cb_probe_uuid()
490 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 …]
Dxfs_log_recover.c277 char *buffer, in xlog_find_cycle_start() argument
291 error = xlog_bread(log, mid_blk, 1, buffer, &offset); in xlog_find_cycle_start()
327 char *buffer; in xlog_find_verify_cycle() local
341 while (!(buffer = xlog_alloc_buffer(log, bufblks))) { in xlog_find_verify_cycle()
352 error = xlog_bread(log, i, bcount, buffer, &buf); in xlog_find_verify_cycle()
370 kmem_free(buffer); in xlog_find_verify_cycle()
407 char *buffer; in xlog_find_verify_log_record() local
417 buffer = xlog_alloc_buffer(log, num_blks); in xlog_find_verify_log_record()
418 if (!buffer) { in xlog_find_verify_log_record()
419 buffer = xlog_alloc_buffer(log, 1); in xlog_find_verify_log_record()
[all …]
Dxfs_sysctl.c16 void *buffer, in xfs_stats_clear_proc_handler() argument
22 ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); in xfs_stats_clear_proc_handler()
36 void *buffer, in xfs_panic_mask_proc_handler() argument
42 ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); in xfs_panic_mask_proc_handler()
57 void *buffer, in xfs_deprecate_irix_sgid_inherit_proc_handler() argument
66 return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); in xfs_deprecate_irix_sgid_inherit_proc_handler()
73 void *buffer, in xfs_deprecate_irix_symlink_mode_proc_handler() argument
82 return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); in xfs_deprecate_irix_symlink_mode_proc_handler()
/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/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/cifs/
Dmisc.c247 header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , in header_assemble() argument
251 char *temp = (char *) buffer; in header_assemble()
255 buffer->smb_buf_length = cpu_to_be32( in header_assemble()
260 buffer->Protocol[0] = 0xFF; in header_assemble()
261 buffer->Protocol[1] = 'S'; in header_assemble()
262 buffer->Protocol[2] = 'M'; in header_assemble()
263 buffer->Protocol[3] = 'B'; in header_assemble()
264 buffer->Command = smb_command; in header_assemble()
265 buffer->Flags = 0x00; /* case sensitive */ in header_assemble()
266 buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES; in header_assemble()
[all …]
/fs/proc/
Dkcore.c312 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument
354 if (copy_to_user(buffer, (char *)&ehdr + *fpos, tsz)) { in read_kcore()
359 buffer += tsz; in read_kcore()
399 if (copy_to_user(buffer, (char *)phdrs + *fpos - phdrs_offset, in read_kcore()
407 buffer += tsz; in read_kcore()
449 if (copy_to_user(buffer, notes + *fpos - notes_offset, tsz)) { in read_kcore()
456 buffer += tsz; in read_kcore()
484 if (clear_user(buffer, tsz)) { in read_kcore()
490 if (clear_user(buffer, tsz)) { in read_kcore()
497 if (copy_to_user(buffer, buf, tsz)) { in read_kcore()
[all …]
/fs/nfs/
Dnamespace.c52 char *nfs_path(char **p, struct dentry *dentry_in, char *buffer, in nfs_path() argument
65 end = buffer+buflen; in nfs_path()
264 char *buffer, *p; in nfs_do_submount() local
278 buffer = kmalloc(4096, GFP_USER); in nfs_do_submount()
279 if (!buffer) in nfs_do_submount()
285 p = nfs_devname(dentry, buffer, 4096); in nfs_do_submount()
290 ret = vfs_parse_fs_string(fc, "source", p, buffer + 4096 - p); in nfs_do_submount()
294 kfree(buffer); in nfs_do_submount()
344 static int param_get_nfs_timeout(char *buffer, const struct kernel_param *kp) in param_get_nfs_timeout() argument
355 return scnprintf(buffer, PAGE_SIZE, "%li\n", num); in param_get_nfs_timeout()
/fs/erofs/
Dxattr.c327 char *buffer; member
356 return !it->buffer ? 1 : err; in xattr_checkbuffer()
365 memcpy(it->buffer + processed, buf, len); in xattr_copyvalue()
443 void *buffer, size_t buffer_size) in erofs_getxattr() argument
462 it.buffer = buffer; in erofs_getxattr()
474 const char *name, void *buffer, size_t size, in erofs_xattr_generic_get() argument
492 return erofs_getxattr(inode, handler->flags, name, buffer, size); in erofs_xattr_generic_get()
534 char *buffer; member
555 if (!it->buffer) { in xattr_entrylist()
564 memcpy(it->buffer + it->buffer_ofs, prefix, prefix_len); in xattr_entrylist()
[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/btrfs/
Dxattr.c24 void *buffer, size_t size) in btrfs_getxattr() argument
70 read_extent_buffer(leaf, buffer, data_ptr, in btrfs_getxattr()
274 ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) in btrfs_listxattr() argument
354 if (!buffer || (name_len + 1) > size_left) { in btrfs_listxattr()
359 read_extent_buffer(leaf, buffer, name_ptr, name_len); in btrfs_listxattr()
360 buffer[name_len] = '\0'; in btrfs_listxattr()
363 buffer += name_len + 1; in btrfs_listxattr()
381 const char *name, void *buffer, size_t size, in btrfs_xattr_handler_get() argument
385 return btrfs_getxattr(inode, name, buffer, size); in btrfs_xattr_handler_get()
390 const char *name, const void *buffer, in btrfs_xattr_handler_set() argument
[all …]
/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()

1234567