/fs/ |
D | d_path.c | 11 static int prepend(char **buffer, int *buflen, const char *str, int namelen) in prepend() argument 13 *buflen -= namelen; in prepend() 14 if (*buflen < 0) in prepend() 38 static int prepend_name(char **buffer, int *buflen, const struct qstr *name) in prepend_name() argument 44 *buflen -= dlen + 1; in prepend_name() 45 if (*buflen < 0) in prepend_name() 77 char **buffer, int *buflen) in prepend_path() argument 94 blen = *buflen; in prepend_path() 108 blen = *buflen; in prepend_path() 156 *buflen = blen; in prepend_path() [all …]
|
D | anon_inodes.c | 33 static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen) in anon_inodefs_dname() argument 35 return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s", in anon_inodefs_dname()
|
D | nsfs.c | 23 static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) in ns_dname() argument 28 return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", in ns_dname()
|
/fs/9p/ |
D | vfs_dir.c | 71 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument 75 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf() 92 int buflen; in v9fs_dir_readdir() local 99 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir() 101 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir() 105 kvec.iov_len = buflen; in v9fs_dir_readdir() 111 iov_iter_kvec(&to, READ, &kvec, 1, buflen); in v9fs_dir_readdir() 152 int buflen; in v9fs_dir_readdir_dotl() local 159 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl() 161 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl() [all …]
|
/fs/romfs/ |
D | storage.c | 24 void *buf, size_t buflen) in romfs_mtd_read() argument 29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read() 30 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read() 104 void *buf, size_t buflen) in romfs_blk_read() argument 111 while (buflen > 0) { in romfs_blk_read() 113 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read() 120 buflen -= segment; in romfs_blk_read() 215 void *buf, size_t buflen) in romfs_dev_read() argument 222 if (buflen > limit - pos) in romfs_dev_read() 223 buflen = limit - pos; in romfs_dev_read() [all …]
|
D | internal.h | 39 void *buf, size_t buflen);
|
/fs/proc/ |
D | kcore.c | 314 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument 323 size_t orig_buflen = buflen; in read_kcore() 333 if (buflen && *fpos < sizeof(struct elfhdr)) { in read_kcore() 355 tsz = min_t(size_t, buflen, sizeof(struct elfhdr) - *fpos); in read_kcore() 362 buflen -= tsz; in read_kcore() 367 if (buflen && *fpos < phdrs_offset + phdrs_len) { in read_kcore() 400 tsz = min_t(size_t, buflen, phdrs_offset + phdrs_len - *fpos); in read_kcore() 410 buflen -= tsz; in read_kcore() 415 if (buflen && *fpos < notes_offset + notes_len) { in read_kcore() 450 tsz = min_t(size_t, buflen, notes_offset + notes_len - *fpos); in read_kcore() [all …]
|
D | vmcore.c | 295 static ssize_t __read_vmcore(char *buffer, size_t buflen, loff_t *fpos, in __read_vmcore() argument 303 if (buflen == 0 || *fpos >= vmcore_size) in __read_vmcore() 307 if (buflen > vmcore_size - *fpos) in __read_vmcore() 308 buflen = vmcore_size - *fpos; in __read_vmcore() 312 tsz = min(elfcorebuf_sz - (size_t)*fpos, buflen); in __read_vmcore() 315 buflen -= tsz; in __read_vmcore() 321 if (buflen == 0) in __read_vmcore() 342 (size_t)*fpos, buflen); in __read_vmcore() 347 buflen -= tsz; in __read_vmcore() 353 if (!buflen) in __read_vmcore() [all …]
|
D | namespaces.c | 63 static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int buflen) in proc_ns_readlink() argument 78 res = readlink_copy(buffer, buflen, name); in proc_ns_readlink()
|
/fs/afs/ |
D | cache.c | 13 uint16_t buflen, 42 uint16_t buflen, in afs_vnode_cache_check_aux() argument 50 buffer, buflen); in afs_vnode_cache_check_aux() 55 if (buflen != sizeof(aux)) { in afs_vnode_cache_check_aux() 56 _leave(" = OBSOLETE [len %hx != %zx]", buflen, sizeof(aux)); in afs_vnode_cache_check_aux()
|
/fs/nfs/ |
D | namespace.c | 51 char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen, in nfs_path() argument 60 end = buffer+buflen; in nfs_path() 62 buflen--; in nfs_path() 71 buflen -= namelen + 1; in nfs_path() 72 if (buflen < 0) in nfs_path() 86 if (--buflen < 0) { in nfs_path() 107 buflen -= namelen; in nfs_path() 108 if (buflen < 0) { in nfs_path()
|
D | nfs4idmap.c | 180 static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen) in nfs_map_numeric_to_string() argument 182 return snprintf(buf, buflen, "%u", id); in nfs_map_numeric_to_string() 350 size_t buflen, struct idmap *idmap) in nfs_idmap_lookup_name() argument 357 ret = nfs_idmap_get_key(id_str, id_len, type, buf, buflen, idmap); in nfs_idmap_lookup_name() 776 int nfs_map_uid_to_name(const struct nfs_server *server, kuid_t uid, char *buf, size_t buflen) in nfs_map_uid_to_name() argument 784 ret = nfs_idmap_lookup_name(id, "user", buf, buflen, idmap); in nfs_map_uid_to_name() 786 ret = nfs_map_numeric_to_string(id, buf, buflen); in nfs_map_uid_to_name() 790 int nfs_map_gid_to_group(const struct nfs_server *server, kgid_t gid, char *buf, size_t buflen) in nfs_map_gid_to_group() argument 798 ret = nfs_idmap_lookup_name(id, "group", buf, buflen, idmap); in nfs_map_gid_to_group() 800 ret = nfs_map_numeric_to_string(id, buf, buflen); in nfs_map_gid_to_group()
|
D | nfs4namespace.c | 34 char *buffer, ssize_t buflen) in nfs4_pathname_string() argument 36 char *end = buffer + buflen; in nfs4_pathname_string() 40 buflen--; in nfs4_pathname_string() 45 buflen -= component->len + 1; in nfs4_pathname_string() 46 if (buflen < 0) in nfs4_pathname_string() 84 static char *nfs4_path(struct dentry *dentry, char *buffer, ssize_t buflen) in nfs4_path() argument 87 char *path = nfs_path(&limit, dentry, buffer, buflen, in nfs4_path()
|
D | dns_resolve.c | 230 static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen) in nfs_dns_parse() argument 238 if (buf[buflen-1] != '\n') in nfs_dns_parse() 240 buf[buflen-1] = '\0'; in nfs_dns_parse()
|
/fs/kernfs/ |
D | dir.c | 42 static int kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name_locked() argument 45 return strlcpy(buf, "(null)", buflen); in kernfs_name_locked() 47 return strlcpy(buf, kn->parent ? kn->name : "/", buflen); in kernfs_name_locked() 124 char *buf, size_t buflen) in kernfs_path_from_node_locked() argument 132 return strlcpy(buf, "(null)", buflen); in kernfs_path_from_node_locked() 138 return strlcpy(buf, "/", buflen); in kernfs_path_from_node_locked() 154 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked() 161 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked() 163 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked() 183 int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name() argument [all …]
|
/fs/jffs2/ |
D | compr_rubin.c | 32 unsigned int buflen; member 48 unsigned buflen, unsigned ofs, in init_pushpull() argument 52 pp->buflen = buflen; in init_pushpull() 59 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) in pushbit()
|
/fs/overlayfs/ |
D | dir.c | 910 int buflen = ovl_redirect_max + 1; in ovl_get_redirect() local 918 buf = ret = kmalloc(buflen, GFP_KERNEL); in ovl_get_redirect() 922 buflen--; in ovl_get_redirect() 923 buf[buflen] = '\0'; in ovl_get_redirect() 938 if (thislen + (name[0] != '/') > buflen) { in ovl_get_redirect() 944 buflen -= thislen; in ovl_get_redirect() 945 memcpy(&buf[buflen], name, thislen); in ovl_get_redirect() 953 if (buf[buflen] == '/') in ovl_get_redirect() 955 buflen--; in ovl_get_redirect() 956 buf[buflen] = '/'; in ovl_get_redirect() [all …]
|
D | copy_up.c | 232 int buflen = MAX_HANDLE_SZ; in ovl_encode_real_fh() local 235 buf = kmalloc(buflen, GFP_KERNEL); in ovl_encode_real_fh() 244 dwords = buflen >> 2; in ovl_encode_real_fh() 246 buflen = (dwords << 2); in ovl_encode_real_fh() 250 WARN_ON(buflen > MAX_HANDLE_SZ) || in ovl_encode_real_fh() 255 fh_len = offsetof(struct ovl_fh, fid) + buflen; in ovl_encode_real_fh() 276 memcpy(fh->fid, buf, buflen); in ovl_encode_real_fh()
|
/fs/xfs/libxfs/ |
D | xfs_symlink_remote.c | 30 int buflen = XFS_SYMLINK_BUF_SPACE(mp, mp->m_sb.sb_blocksize); in xfs_symlink_blocks() local 32 return (pathlen + buflen - 1) / buflen; in xfs_symlink_blocks()
|
D | xfs_attr_remote.c | 37 int buflen = XFS_ATTR3_RMT_BUF_SPACE(mp, mp->m_sb.sb_blocksize); in xfs_attr3_rmt_blocks() local 38 return (attrlen + buflen - 1) / buflen; in xfs_attr3_rmt_blocks()
|
/fs/nfsd/ |
D | nfs4idmap.c | 198 idtoname_parse(struct cache_detail *cd, char *buf, int buflen) in idtoname_parse() argument 205 if (buf[buflen - 1] != '\n') in idtoname_parse() 207 buf[buflen - 1]= '\0'; in idtoname_parse() 361 nametoid_parse(struct cache_detail *cd, char *buf, int buflen) in nametoid_parse() argument 367 if (buf[buflen - 1] != '\n') in nametoid_parse() 369 buf[buflen - 1]= '\0'; in nametoid_parse()
|
D | nfsxdr.c | 523 int buflen, slen; in nfssvc_encode_entry() local 541 if ((buflen = cd->buflen - slen - 4) < 0) { in nfssvc_encode_entry() 555 cd->buflen = buflen; in nfssvc_encode_entry()
|
/fs/cifs/ |
D | smbdirect.c | 2077 unsigned int buflen, remaining_data_length; in smbd_send() local 2128 buflen = 0; in smbd_send() 2130 buflen += iov[i].iov_len; in smbd_send() 2131 if (buflen > max_iov_size) { in smbd_send() 2134 (buflen-iov[i].iov_len); in smbd_send() 2147 nvecs = (buflen+max_iov_size-1)/max_iov_size; in smbd_send() 2151 buflen, nvecs); in smbd_send() 2159 buflen - in smbd_send() 2179 buflen = 0; in smbd_send() 2184 remaining_data_length -= buflen; in smbd_send() [all …]
|
D | transport.c | 277 unsigned long buflen = 0; in smb_rqst_len() local 290 buflen += iov[i].iov_len; in smb_rqst_len() 300 buflen += rqst->rq_tailsz; in smb_rqst_len() 306 buflen += rqst->rq_pagesz * (rqst->rq_npages - 1) - in smb_rqst_len() 308 buflen += rqst->rq_tailsz; in smb_rqst_len() 312 return buflen; in smb_rqst_len()
|
/fs/xfs/ |
D | xfs_ioctl32.c | 369 if (al_hreq.buflen < sizeof(struct attrlist) || in xfs_compat_attrlist_by_handle() 370 al_hreq.buflen > XFS_XATTR_LIST_MAX) in xfs_compat_attrlist_by_handle() 384 kbuf = kmem_zalloc_large(al_hreq.buflen, 0); in xfs_compat_attrlist_by_handle() 389 error = xfs_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen, in xfs_compat_attrlist_by_handle() 399 if (copy_to_user(compat_ptr(al_hreq.buffer), kbuf, al_hreq.buflen)) in xfs_compat_attrlist_by_handle()
|