Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 252) sorted by relevance

1234567891011

/fs/nfsd/
Dnfsctl.c79 static ssize_t write_svc(struct file *file, char *buf, size_t size);
80 static ssize_t write_add(struct file *file, char *buf, size_t size);
81 static ssize_t write_del(struct file *file, char *buf, size_t size);
82 static ssize_t write_export(struct file *file, char *buf, size_t size);
83 static ssize_t write_unexport(struct file *file, char *buf, size_t size);
84 static ssize_t write_getfd(struct file *file, char *buf, size_t size);
85 static ssize_t write_getfs(struct file *file, char *buf, size_t size);
86 static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
87 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size);
88 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size);
[all …]
/fs/
Dreaddir.c22 int vfs_readdir(struct file *file, filldir_t filler, void *buf) in vfs_readdir() argument
39 res = file->f_op->readdir(file, buf, filler); in vfs_readdir()
76 struct readdir_callback * buf = (struct readdir_callback *) __buf; in fillonedir() local
80 if (buf->result) in fillonedir()
84 buf->result = -EOVERFLOW; in fillonedir()
87 buf->result++; in fillonedir()
88 dirent = buf->dirent; in fillonedir()
101 buf->result = -EFAULT; in fillonedir()
110 struct readdir_callback buf; in SYSCALL_DEFINE3() local
117 buf.result = 0; in SYSCALL_DEFINE3()
[all …]
Dquota_tree.c46 dqbuf_t buf = kmalloc(size, GFP_NOFS); in getdqbuf() local
47 if (!buf) in getdqbuf()
49 return buf; in getdqbuf()
52 static inline void freedqbuf(dqbuf_t buf) in freedqbuf() argument
54 kfree(buf); in freedqbuf()
57 static inline ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, dqbuf_t buf) in read_blk() argument
61 memset(buf, 0, info->dqi_usable_bs); in read_blk()
62 return sb->s_op->quota_read(sb, info->dqi_type, (char *)buf, in read_blk()
66 static inline ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, dqbuf_t buf) in write_blk() argument
70 return sb->s_op->quota_write(sb, info->dqi_type, (char *)buf, in write_blk()
[all …]
Dpipe.c152 struct pipe_buffer *buf) in anon_pipe_buf_release() argument
154 struct page *page = buf->page; in anon_pipe_buf_release()
182 struct pipe_buffer *buf, int atomic) in generic_pipe_buf_map() argument
185 buf->flags |= PIPE_BUF_FLAG_ATOMIC; in generic_pipe_buf_map()
186 return kmap_atomic(buf->page, KM_USER0); in generic_pipe_buf_map()
189 return kmap(buf->page); in generic_pipe_buf_map()
202 struct pipe_buffer *buf, void *map_data) in generic_pipe_buf_unmap() argument
204 if (buf->flags & PIPE_BUF_FLAG_ATOMIC) { in generic_pipe_buf_unmap()
205 buf->flags &= ~PIPE_BUF_FLAG_ATOMIC; in generic_pipe_buf_unmap()
208 kunmap(buf->page); in generic_pipe_buf_unmap()
[all …]
Dseq_file.c78 if (!m->buf) { in traverse()
79 m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); in traverse()
80 if (!m->buf) in traverse()
118 kfree(m->buf); in traverse()
119 m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); in traverse()
120 return !m->buf ? -ENOMEM : -EAGAIN; in traverse()
132 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument
171 if (!m->buf) { in seq_read()
172 m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); in seq_read()
173 if (!m->buf) in seq_read()
[all …]
Dsplice.c41 struct pipe_buffer *buf) in page_cache_pipe_buf_steal() argument
43 struct page *page = buf->page; in page_cache_pipe_buf_steal()
70 buf->flags |= PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_steal()
85 struct pipe_buffer *buf) in page_cache_pipe_buf_release() argument
87 page_cache_release(buf->page); in page_cache_pipe_buf_release()
88 buf->flags &= ~PIPE_BUF_FLAG_LRU; in page_cache_pipe_buf_release()
96 struct pipe_buffer *buf) in page_cache_pipe_buf_confirm() argument
98 struct page *page = buf->page; in page_cache_pipe_buf_confirm()
144 struct pipe_buffer *buf) in user_page_pipe_buf_steal() argument
146 if (!(buf->flags & PIPE_BUF_FLAG_GIFT)) in user_page_pipe_buf_steal()
[all …]
Dopen.c33 int vfs_statfs(struct dentry *dentry, struct kstatfs *buf) in vfs_statfs() argument
40 memset(buf, 0, sizeof(*buf)); in vfs_statfs()
44 retval = dentry->d_sb->s_op->statfs(dentry, buf); in vfs_statfs()
45 if (retval == 0 && buf->f_frsize == 0) in vfs_statfs()
46 buf->f_frsize = buf->f_bsize; in vfs_statfs()
54 static int vfs_statfs_native(struct dentry *dentry, struct statfs *buf) in vfs_statfs_native() argument
63 if (sizeof(*buf) == sizeof(st)) in vfs_statfs_native()
64 memcpy(buf, &st, sizeof(st)); in vfs_statfs_native()
66 if (sizeof buf->f_blocks == 4) { in vfs_statfs_native()
83 buf->f_type = st.f_type; in vfs_statfs_native()
[all …]
/fs/hostfs/
Dhostfs_user.c28 struct stat64 buf; in stat_file() local
31 if (fstat64(fd, &buf) < 0) in stat_file()
33 } else if (lstat64(path, &buf) < 0) { in stat_file()
38 *inode_out = buf.st_ino; in stat_file()
40 *mode_out = buf.st_mode; in stat_file()
42 *nlink_out = buf.st_nlink; in stat_file()
44 *uid_out = buf.st_uid; in stat_file()
46 *gid_out = buf.st_gid; in stat_file()
48 *size_out = buf.st_size; in stat_file()
50 atime_out->tv_sec = buf.st_atime; in stat_file()
[all …]
/fs/ext4/
Dhash.c19 static void TEA_transform(__u32 buf[4], __u32 const in[]) in TEA_transform()
22 __u32 b0 = buf[0], b1 = buf[1]; in TEA_transform()
32 buf[0] += b0; in TEA_transform()
33 buf[1] += b1; in TEA_transform()
70 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
87 *buf++ = val; in str2hashbuf_signed()
93 *buf++ = val; in str2hashbuf_signed()
95 *buf++ = pad; in str2hashbuf_signed()
98 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
115 *buf++ = val; in str2hashbuf_unsigned()
[all …]
/fs/ext3/
Dhash.c19 static void TEA_transform(__u32 buf[4], __u32 const in[]) in TEA_transform()
22 __u32 b0 = buf[0], b1 = buf[1]; in TEA_transform()
32 buf[0] += b0; in TEA_transform()
33 buf[1] += b1; in TEA_transform()
70 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
87 *buf++ = val; in str2hashbuf_signed()
93 *buf++ = val; in str2hashbuf_signed()
95 *buf++ = pad; in str2hashbuf_signed()
98 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
115 *buf++ = val; in str2hashbuf_unsigned()
[all …]
/fs/gfs2/locking/dlm/
Dsysfs.c15 static ssize_t proto_name_show(struct gdlm_ls *ls, char *buf) in proto_name_show() argument
17 return sprintf(buf, "%s\n", gdlm_ops.lm_proto_name); in proto_name_show()
20 static ssize_t block_show(struct gdlm_ls *ls, char *buf) in block_show() argument
27 ret = sprintf(buf, "%d\n", val); in block_show()
31 static ssize_t block_store(struct gdlm_ls *ls, const char *buf, size_t len) in block_store() argument
36 val = simple_strtol(buf, NULL, 0); in block_store()
49 static ssize_t withdraw_show(struct gdlm_ls *ls, char *buf) in withdraw_show() argument
56 ret = sprintf(buf, "%d\n", val); in withdraw_show()
60 static ssize_t withdraw_store(struct gdlm_ls *ls, const char *buf, size_t len) in withdraw_store() argument
65 val = simple_strtol(buf, NULL, 0); in withdraw_store()
[all …]
/fs/xfs/
Dxfs_itable.c57 xfs_bstat_t *buf, /* return buffer */ in xfs_bulkstat_one_iget() argument
79 buf->bs_nlink = dic->di_nlink; in xfs_bulkstat_one_iget()
80 buf->bs_projid = dic->di_projid; in xfs_bulkstat_one_iget()
81 buf->bs_ino = ino; in xfs_bulkstat_one_iget()
82 buf->bs_mode = dic->di_mode; in xfs_bulkstat_one_iget()
83 buf->bs_uid = dic->di_uid; in xfs_bulkstat_one_iget()
84 buf->bs_gid = dic->di_gid; in xfs_bulkstat_one_iget()
85 buf->bs_size = dic->di_size; in xfs_bulkstat_one_iget()
86 vn_atime_to_bstime(VFS_I(ip), &buf->bs_atime); in xfs_bulkstat_one_iget()
87 buf->bs_mtime.tv_sec = dic->di_mtime.t_sec; in xfs_bulkstat_one_iget()
[all …]
/fs/ocfs2/dlm/
Ddlmdebug.c47 static int stringify_lockname(const char *lockname, int locklen, char *buf,
101 char buf[DLM_LOCKID_NAME_MAX]; in __dlm_print_one_lock_resource() local
106 buf, sizeof(buf) - 1); in __dlm_print_one_lock_resource()
108 buf, res->owner, res->state); in __dlm_print_one_lock_resource()
255 static int stringify_lockname(const char *lockname, int locklen, char *buf, in stringify_lockname() argument
266 out += snprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname()
270 out += snprintf(buf + out, len - out, "%.*s", in stringify_lockname()
276 char *buf, int len) in stringify_nodemap() argument
282 out += snprintf(buf + out, len - out, "%d ", i); in stringify_nodemap()
287 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument
[all …]
/fs/ubifs/
Dscan.c40 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument
43 uint8_t *p = buf; in scan_padding_bytes()
69 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
72 struct ubifs_ch *ch = buf; in ubifs_scan_a_node()
83 return scan_padding_bytes(buf, len); in ubifs_scan_a_node()
90 if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) in ubifs_scan_a_node()
94 struct ubifs_pad_node *pad = buf; in ubifs_scan_a_node()
150 sleb->buf = sbuf; in ubifs_start_scan()
195 void *buf, int offs) in ubifs_add_snod() argument
197 struct ubifs_ch *ch = buf; in ubifs_add_snod()
[all …]
Dio.c95 int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, in ubifs_check_node() argument
100 const struct ubifs_ch *ch = buf; in ubifs_check_node()
136 crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); in ubifs_check_node()
154 dbg_dump_node(c, buf); in ubifs_check_node()
176 void ubifs_pad(const struct ubifs_info *c, void *buf, int pad) in ubifs_pad() argument
183 struct ubifs_ch *ch = buf; in ubifs_pad()
184 struct ubifs_pad_node *pad_node = buf; in ubifs_pad()
194 crc = crc32(UBIFS_CRC32_INIT, buf + 8, UBIFS_PAD_NODE_SZ - 8); in ubifs_pad()
196 memset(buf + UBIFS_PAD_NODE_SZ, 0, pad); in ubifs_pad()
199 memset(buf, UBIFS_PADDING_BYTE, pad); in ubifs_pad()
[all …]
Drecovery.c44 static int is_empty(void *buf, int len) in is_empty() argument
46 uint8_t *p = buf; in is_empty()
77 void *sbuf, *buf; in get_master_node() local
89 buf = sbuf; in get_master_node()
92 struct ubifs_ch *ch = buf; in get_master_node()
97 buf += sz; in get_master_node()
105 buf -= sz; in get_master_node()
107 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
111 buf -= sz; in get_master_node()
113 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
[all …]
/fs/gfs2/
Dsys.c29 static ssize_t id_show(struct gfs2_sbd *sdp, char *buf) in id_show() argument
31 return snprintf(buf, PAGE_SIZE, "%u:%u\n", in id_show()
35 static ssize_t fsname_show(struct gfs2_sbd *sdp, char *buf) in fsname_show() argument
37 return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_fsname); in fsname_show()
40 static ssize_t freeze_show(struct gfs2_sbd *sdp, char *buf) in freeze_show() argument
48 return snprintf(buf, PAGE_SIZE, "%u\n", count); in freeze_show()
51 static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len) in freeze_store() argument
55 int n = simple_strtol(buf, NULL, 0); in freeze_store()
77 static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf) in withdraw_show() argument
80 return snprintf(buf, PAGE_SIZE, "%u\n", b); in withdraw_show()
[all …]
/fs/cifs/
Dmd5.c26 static void MD5Transform(__u32 buf[4], __u32 const in[16]);
32 byteReverse(unsigned char *buf, unsigned longs) in byteReverse() argument
36 t = (__u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | in byteReverse()
37 ((unsigned) buf[1] << 8 | buf[0]); in byteReverse()
38 *(__u32 *) buf = t; in byteReverse()
39 buf += 4; in byteReverse()
50 ctx->buf[0] = 0x67452301; in cifs_MD5_init()
51 ctx->buf[1] = 0xefcdab89; in cifs_MD5_init()
52 ctx->buf[2] = 0x98badcfe; in cifs_MD5_init()
53 ctx->buf[3] = 0x10325476; in cifs_MD5_init()
[all …]
/fs/ncpfs/
Dncpsign_kernel.c22 #define BVAL(buf,pos) (((__u8 *)(buf))[pos]) argument
23 #define PVAL(buf,pos) ((unsigned)BVAL(buf,pos)) argument
24 #define BSET(buf,pos,val) (BVAL(buf,pos) = (val)) argument
27 WVAL_LH(__u8 * buf, int pos) in WVAL_LH() argument
29 return PVAL(buf, pos) | PVAL(buf, pos + 1) << 8; in WVAL_LH()
32 DVAL_LH(__u8 * buf, int pos) in DVAL_LH() argument
34 return WVAL_LH(buf, pos) | WVAL_LH(buf, pos + 2) << 16; in DVAL_LH()
37 WSET_LH(__u8 * buf, int pos, __u16 val) in WSET_LH() argument
39 BSET(buf, pos, val & 0xff); in WSET_LH()
40 BSET(buf, pos + 1, val >> 8); in WSET_LH()
[all …]
/fs/yaffs2/
Dyaffs_fs.c65 #define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf) argument
71 #define yaffs_devname(sb, buf) kdevname(sb->s_dev) argument
173 static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
225 static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf);
227 static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf);
229 static int yaffs_statfs(struct super_block *sb, struct statfs *buf);
1032 static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, in yaffs_file_write() argument
1062 nWritten = yaffs_WriteDataToFile(obj, buf, ipos, n, 0); in yaffs_file_write()
1529 static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf) argument
1534 static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf)
[all …]
/fs/btrfs/
Dsysfs.c31 static ssize_t root_blocks_used_show(struct btrfs_root *root, char *buf) in root_blocks_used_show() argument
33 return snprintf(buf, PAGE_SIZE, "%llu\n", in root_blocks_used_show()
37 static ssize_t root_block_limit_show(struct btrfs_root *root, char *buf) in root_block_limit_show() argument
39 return snprintf(buf, PAGE_SIZE, "%llu\n", in root_block_limit_show()
43 static ssize_t super_blocks_used_show(struct btrfs_fs_info *fs, char *buf) in super_blocks_used_show() argument
46 return snprintf(buf, PAGE_SIZE, "%llu\n", in super_blocks_used_show()
50 static ssize_t super_total_blocks_show(struct btrfs_fs_info *fs, char *buf) in super_total_blocks_show() argument
52 return snprintf(buf, PAGE_SIZE, "%llu\n", in super_total_blocks_show()
56 static ssize_t super_blocksize_show(struct btrfs_fs_info *fs, char *buf) in super_blocksize_show() argument
58 return snprintf(buf, PAGE_SIZE, "%llu\n", in super_blocksize_show()
[all …]
/fs/dlm/
Dconfig.c61 char *buf);
64 const char *buf, size_t len);
66 char *buf);
68 const char *buf, size_t len);
70 char *buf);
72 const char *buf, size_t len);
74 static ssize_t comm_nodeid_read(struct dlm_comm *cm, char *buf);
75 static ssize_t comm_nodeid_write(struct dlm_comm *cm, const char *buf,
77 static ssize_t comm_local_read(struct dlm_comm *cm, char *buf);
78 static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf,
[all …]
/fs/jffs2/
Dread.c22 struct jffs2_full_dnode *fd, unsigned char *buf, in jffs2_read_dnode() argument
53 je32_to_cpu(ri->offset), buf)); in jffs2_read_dnode()
77 memset(buf, 0, len); in jffs2_read_dnode()
88 readbuf = buf; in jffs2_read_dnode()
104 decomprbuf = buf; in jffs2_read_dnode()
139 memcpy(buf, decomprbuf+ofs, len); in jffs2_read_dnode()
142 if(decomprbuf != buf && decomprbuf != readbuf) in jffs2_read_dnode()
145 if(readbuf != buf) in jffs2_read_dnode()
154 unsigned char *buf, uint32_t offset, uint32_t len) in jffs2_read_inode_range() argument
177 memset(buf, 0, holesize); in jffs2_read_inode_range()
[all …]
/fs/ecryptfs/
Dfile.c83 struct ecryptfs_getdents_callback *buf = in ecryptfs_filldir() local
89 buf->filldir_called++; in ecryptfs_filldir()
91 buf->dentry, lower_name, in ecryptfs_filldir()
99 rc = buf->filldir(buf->dirent, name, name_size, offset, ino, d_type); in ecryptfs_filldir()
102 buf->entries_written++; in ecryptfs_filldir()
118 struct ecryptfs_getdents_callback buf; in ecryptfs_readdir() local
123 memset(&buf, 0, sizeof(buf)); in ecryptfs_readdir()
124 buf.dirent = dirent; in ecryptfs_readdir()
125 buf.dentry = file->f_path.dentry; in ecryptfs_readdir()
126 buf.filldir = filldir; in ecryptfs_readdir()
[all …]
/fs/ocfs2/cluster/
Dmasklog.c36 static ssize_t mlog_mask_show(u64 mask, char *buf) in mlog_mask_show() argument
47 return snprintf(buf, PAGE_SIZE, "%s\n", state); in mlog_mask_show()
50 static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count) in mlog_mask_store() argument
52 if (!strnicmp(buf, "allow", 5)) { in mlog_mask_store()
55 } else if (!strnicmp(buf, "deny", 4)) { in mlog_mask_store()
58 } else if (!strnicmp(buf, "off", 3)) { in mlog_mask_store()
122 char *buf) in mlog_show() argument
126 return mlog_mask_show(mlog_attr->mask, buf); in mlog_show()
130 const char *buf, size_t count) in mlog_store() argument
134 return mlog_mask_store(mlog_attr->mask, buf, count); in mlog_store()

1234567891011