/fs/hfsplus/ |
D | bfind.c | 14 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument 18 fd->tree = tree; in hfs_find_init() 19 fd->bnode = NULL; in hfs_find_init() 23 fd->search_key = ptr; in hfs_find_init() 24 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init() 43 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument 45 hfs_bnode_put(fd->bnode); in hfs_find_exit() 46 kfree(fd->search_key); in hfs_find_exit() 48 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit() 49 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit() [all …]
|
D | brec.c | 14 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd); 15 static int hfs_brec_update_parent(struct hfs_find_data *fd); 62 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument 71 tree = fd->tree; in hfs_brec_insert() 72 if (!fd->bnode) { in hfs_brec_insert() 75 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert() 76 if (IS_ERR(fd->bnode)) in hfs_brec_insert() 77 return PTR_ERR(fd->bnode); in hfs_brec_insert() 78 fd->record = -1; in hfs_brec_insert() 81 key_len = be16_to_cpu(fd->search_key->key_len) + 2; in hfs_brec_insert() [all …]
|
D | attributes.c | 165 const char *name, struct hfs_find_data *fd) in hfsplus_find_attr() argument 177 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, name); in hfsplus_find_attr() 180 err = hfs_brec_find(fd, hfs_find_rec_by_key); in hfsplus_find_attr() 184 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, NULL); in hfsplus_find_attr() 187 err = hfs_brec_find(fd, hfs_find_1st_rec_by_cnid); in hfsplus_find_attr() 200 struct hfs_find_data fd; in hfsplus_attr_exists() local 205 err = hfs_find_init(HFSPLUS_SB(sb)->attr_tree, &fd); in hfsplus_attr_exists() 209 err = hfsplus_find_attr(sb, inode->i_ino, name, &fd); in hfsplus_attr_exists() 213 hfs_find_exit(&fd); in hfsplus_attr_exists() 217 hfs_find_exit(&fd); in hfsplus_attr_exists() [all …]
|
D | catalog.c | 178 struct hfs_find_data *fd) in hfsplus_find_cat() argument 184 hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL); in hfsplus_find_cat() 185 err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry)); in hfsplus_find_cat() 200 hfsplus_cat_build_key_uni(fd->search_key, in hfsplus_find_cat() 203 return hfs_brec_find(fd, hfs_find_rec_by_key); in hfsplus_find_cat() 210 struct hfs_find_data fd; in hfsplus_create_cat() local 217 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_create_cat() 221 hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); in hfsplus_create_cat() 226 err = hfs_brec_find(&fd, hfs_find_rec_by_key); in hfsplus_create_cat() 232 err = hfs_brec_insert(&fd, &entry, entry_size); in hfsplus_create_cat() [all …]
|
D | extents.c | 87 struct hfs_find_data *fd) in __hfsplus_ext_write_extent() argument 94 hfsplus_ext_build_key(fd->search_key, inode->i_ino, hip->cached_start, in __hfsplus_ext_write_extent() 98 res = hfs_brec_find(fd, hfs_find_rec_by_key); in __hfsplus_ext_write_extent() 102 hfs_brec_insert(fd, hip->cached_extents, in __hfsplus_ext_write_extent() 108 hfs_bnode_write(fd->bnode, hip->cached_extents, in __hfsplus_ext_write_extent() 109 fd->entryoffset, fd->entrylength); in __hfsplus_ext_write_extent() 129 struct hfs_find_data fd; in hfsplus_ext_write_extent_locked() local 131 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->ext_tree, &fd); in hfsplus_ext_write_extent_locked() 134 res = __hfsplus_ext_write_extent(inode, &fd); in hfsplus_ext_write_extent_locked() 135 hfs_find_exit(&fd); in hfsplus_ext_write_extent_locked() [all …]
|
D | xattr.c | 261 struct hfs_find_data fd; in hfsplus_getxattr_finder_info() local 270 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->cat_tree, &fd); in hfsplus_getxattr_finder_info() 275 res = hfsplus_find_cat(inode->i_sb, inode->i_ino, &fd); in hfsplus_getxattr_finder_info() 278 entry_type = hfs_bnode_read_u16(fd.bnode, fd.entryoffset); in hfsplus_getxattr_finder_info() 281 hfs_bnode_read(fd.bnode, folder_finder_info, in hfsplus_getxattr_finder_info() 282 fd.entryoffset + in hfsplus_getxattr_finder_info() 288 hfs_bnode_read(fd.bnode, file_finder_info, in hfsplus_getxattr_finder_info() 289 fd.entryoffset + in hfsplus_getxattr_finder_info() 303 hfs_find_exit(&fd); in hfsplus_getxattr_finder_info() 311 struct hfs_find_data fd; in hfsplus_getxattr() local [all …]
|
D | dir.c | 32 struct hfs_find_data fd; in hfsplus_lookup() local 42 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_lookup() 45 hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name); in hfsplus_lookup() 47 err = hfs_brec_read(&fd, &entry, sizeof(entry)); in hfsplus_lookup() 50 hfs_find_exit(&fd); in hfsplus_lookup() 59 if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) { in hfsplus_lookup() 66 if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { in hfsplus_lookup() 98 hfsplus_cat_build_key(sb, fd.search_key, in hfsplus_lookup() 110 hfs_find_exit(&fd); in hfsplus_lookup() 120 hfs_find_exit(&fd); in hfsplus_lookup() [all …]
|
D | inode.c | 183 struct hfs_find_data fd; in hfsplus_file_lookup() local 209 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_file_lookup() 211 err = hfsplus_find_cat(sb, dir->i_ino, &fd); in hfsplus_file_lookup() 213 err = hfsplus_cat_read_inode(inode, &fd); in hfsplus_file_lookup() 214 hfs_find_exit(&fd); in hfsplus_file_lookup() 520 int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) in hfsplus_cat_read_inode() argument 526 type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset); in hfsplus_cat_read_inode() 532 if (fd->entrylength < sizeof(struct hfsplus_cat_folder)) in hfsplus_cat_read_inode() 534 hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, in hfsplus_cat_read_inode() 549 if (fd->entrylength < sizeof(struct hfsplus_cat_file)) in hfsplus_cat_read_inode() [all …]
|
/fs/hfs/ |
D | bfind.c | 14 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument 18 fd->tree = tree; in hfs_find_init() 19 fd->bnode = NULL; in hfs_find_init() 23 fd->search_key = ptr; in hfs_find_init() 24 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init() 31 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument 33 hfs_bnode_put(fd->bnode); in hfs_find_exit() 34 kfree(fd->search_key); in hfs_find_exit() 36 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit() 37 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit() [all …]
|
D | brec.c | 13 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd); 14 static int hfs_brec_update_parent(struct hfs_find_data *fd); 64 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument 73 tree = fd->tree; in hfs_brec_insert() 74 if (!fd->bnode) { in hfs_brec_insert() 77 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert() 78 if (IS_ERR(fd->bnode)) in hfs_brec_insert() 79 return PTR_ERR(fd->bnode); in hfs_brec_insert() 80 fd->record = -1; in hfs_brec_insert() 83 key_len = (fd->search_key->key_len | 1) + 1; in hfs_brec_insert() [all …]
|
D | catalog.c | 84 struct hfs_find_data fd; in hfs_cat_create() local 96 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_cat_create() 100 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create() 104 err = hfs_brec_find(&fd); in hfs_cat_create() 110 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create() 114 hfs_cat_build_key(sb, fd.search_key, dir->i_ino, str); in hfs_cat_create() 116 err = hfs_brec_find(&fd); in hfs_cat_create() 123 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create() 130 hfs_find_exit(&fd); in hfs_cat_create() 134 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create() [all …]
|
D | dir.c | 24 struct hfs_find_data fd; in hfs_lookup() local 28 res = hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd); in hfs_lookup() 31 hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name); in hfs_lookup() 32 res = hfs_brec_read(&fd, &rec, sizeof(rec)); in hfs_lookup() 34 hfs_find_exit(&fd); in hfs_lookup() 42 inode = hfs_iget(dir->i_sb, &fd.search_key->cat, &rec); in hfs_lookup() 43 hfs_find_exit(&fd); in hfs_lookup() 61 struct hfs_find_data fd; in hfs_readdir() local 68 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_readdir() 71 hfs_cat_build_key(sb, fd.search_key, inode->i_ino, NULL); in hfs_readdir() [all …]
|
D | attr.c | 20 struct hfs_find_data fd; in hfs_setxattr() local 28 res = hfs_find_init(HFS_SB(inode->i_sb)->cat_tree, &fd); in hfs_setxattr() 31 fd.search_key->cat = HFS_I(inode)->cat_key; in hfs_setxattr() 32 res = hfs_brec_find(&fd); in hfs_setxattr() 35 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_setxattr() 52 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_setxattr() 55 hfs_find_exit(&fd); in hfs_setxattr() 63 struct hfs_find_data fd; in hfs_getxattr() local 72 res = hfs_find_init(HFS_SB(inode->i_sb)->cat_tree, &fd); in hfs_getxattr() 75 fd.search_key->cat = HFS_I(inode)->cat_key; in hfs_getxattr() [all …]
|
D | extent.c | 110 static int __hfs_ext_write_extent(struct inode *inode, struct hfs_find_data *fd) in __hfs_ext_write_extent() argument 114 hfs_ext_build_key(fd->search_key, inode->i_ino, HFS_I(inode)->cached_start, in __hfs_ext_write_extent() 116 res = hfs_brec_find(fd); in __hfs_ext_write_extent() 120 hfs_brec_insert(fd, HFS_I(inode)->cached_extents, sizeof(hfs_extent_rec)); in __hfs_ext_write_extent() 125 hfs_bnode_write(fd->bnode, HFS_I(inode)->cached_extents, fd->entryoffset, fd->entrylength); in __hfs_ext_write_extent() 133 struct hfs_find_data fd; in hfs_ext_write_extent() local 137 res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); in hfs_ext_write_extent() 140 res = __hfs_ext_write_extent(inode, &fd); in hfs_ext_write_extent() 141 hfs_find_exit(&fd); in hfs_ext_write_extent() 146 static inline int __hfs_ext_read_extent(struct hfs_find_data *fd, struct hfs_extent *extent, in __hfs_ext_read_extent() argument [all …]
|
/fs/ |
D | file.c | 51 free_fdmem(fdt->fd); in __free_fdtable() 73 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 74 memset((char *)(nfdt->fd) + cpy, 0, set); in copy_fdtable() 117 fdt->fd = data; in alloc_fdtable() 130 free_fdmem(fdt->fd); in alloc_fdtable() 207 static inline void __set_close_on_exec(int fd, struct fdtable *fdt) in __set_close_on_exec() argument 209 __set_bit(fd, fdt->close_on_exec); in __set_close_on_exec() 212 static inline void __clear_close_on_exec(int fd, struct fdtable *fdt) in __clear_close_on_exec() argument 214 __clear_bit(fd, fdt->close_on_exec); in __clear_close_on_exec() 217 static inline void __set_open_fd(int fd, struct fdtable *fdt) in __set_open_fd() argument [all …]
|
D | sync.c | 149 SYSCALL_DEFINE1(syncfs, int, fd) in SYSCALL_DEFINE1() argument 151 struct fd f = fdget(fd); in SYSCALL_DEFINE1() 200 static int do_fsync(unsigned int fd, int datasync) in do_fsync() argument 202 struct fd f = fdget(fd); in do_fsync() 213 SYSCALL_DEFINE1(fsync, unsigned int, fd) in SYSCALL_DEFINE1() argument 215 return do_fsync(fd, 0); in SYSCALL_DEFINE1() 218 SYSCALL_DEFINE1(fdatasync, unsigned int, fd) in SYSCALL_DEFINE1() argument 220 return do_fsync(fd, 1); in SYSCALL_DEFINE1() 287 SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, in SYSCALL_DEFINE4() argument 291 struct fd f; in SYSCALL_DEFINE4() [all …]
|
D | fcntl.c | 31 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument 69 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl() 251 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, in do_fcntl() argument 264 err = get_close_on_exec(fd) ? FD_CLOEXEC : 0; in do_fcntl() 268 set_close_on_exec(fd, arg & FD_CLOEXEC); in do_fcntl() 274 err = setfl(fd, filp, arg); in do_fcntl() 281 err = fcntl_setlk(fd, filp, cmd, (struct flock __user *) arg); in do_fcntl() 321 err = fcntl_setlease(fd, filp, arg); in do_fcntl() 324 err = fcntl_dirnotify(fd, filp, arg); in do_fcntl() 349 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument [all …]
|
D | read_write.c | 238 SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence) in SYSCALL_DEFINE3() argument 241 struct fd f = fdget(fd); in SYSCALL_DEFINE3() 257 COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned int, whence) in COMPAT_SYSCALL_DEFINE3() argument 259 return sys_lseek(fd, offset, whence); in COMPAT_SYSCALL_DEFINE3() 264 SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, in SYSCALL_DEFINE5() argument 269 struct fd f = fdget(fd); in SYSCALL_DEFINE5() 472 SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) in SYSCALL_DEFINE3() argument 474 struct fd f = fdget(fd); in SYSCALL_DEFINE3() 486 SYSCALL_DEFINE3(write, unsigned int, fd, const char __user *, buf, in SYSCALL_DEFINE3() argument 489 struct fd f = fdget(fd); in SYSCALL_DEFINE3() [all …]
|
D | compat_ioctl.c | 119 static int w_long(unsigned int fd, unsigned int cmd, in w_long() argument 127 err = sys_ioctl(fd, cmd, (unsigned long)&val); in w_long() 143 static int do_video_get_event(unsigned int fd, unsigned int cmd, in do_video_get_event() argument 151 err = sys_ioctl(fd, cmd, (unsigned long) &kevent); in do_video_get_event() 173 static int do_video_stillpicture(unsigned int fd, unsigned int cmd, in do_video_stillpicture() argument 194 err = sys_ioctl(fd, cmd, (unsigned long) up_native); in do_video_stillpicture() 204 static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd, in do_video_set_spu_palette() argument 222 err = sys_ioctl(fd, cmd, (unsigned long) up_native); in do_video_set_spu_palette() 280 static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, in sg_ioctl_trans() argument 293 return sys_ioctl(fd, cmd, (unsigned long)sgio32); in sg_ioctl_trans() [all …]
|
/fs/jffs2/ |
D | build.c | 54 struct jffs2_full_dirent *fd; in jffs2_build_inode_pass1() local 59 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1() 61 if (!fd->ino) in jffs2_build_inode_pass1() 66 child_ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_inode_pass1() 69 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1() 70 jffs2_mark_node_obsolete(c, fd->raw); in jffs2_build_inode_pass1() 74 if (fd->type == DT_DIR) { in jffs2_build_inode_pass1() 77 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1() 85 dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino); in jffs2_build_inode_pass1() 100 struct jffs2_full_dirent *fd; in jffs2_build_filesystem() local [all …]
|
D | write.c | 209 struct jffs2_full_dirent *fd; in jffs2_write_dirent() local 242 fd = jffs2_alloc_full_dirent(namelen+1); in jffs2_write_dirent() 243 if (!fd) in jffs2_write_dirent() 246 fd->version = je32_to_cpu(rd->version); in jffs2_write_dirent() 247 fd->ino = je32_to_cpu(rd->ino); in jffs2_write_dirent() 248 fd->nhash = full_name_hash(name, namelen); in jffs2_write_dirent() 249 fd->type = rd->type; in jffs2_write_dirent() 250 memcpy(fd->name, name, namelen); in jffs2_write_dirent() 251 fd->name[namelen]=0; in jffs2_write_dirent() 264 fd->version = je32_to_cpu(rd->version); in jffs2_write_dirent() [all …]
|
D | dir.c | 80 struct jffs2_full_dirent *fd = NULL, *fd_list; in jffs2_lookup() local 96 (!fd || fd_list->version > fd->version) && in jffs2_lookup() 99 fd = fd_list; in jffs2_lookup() 102 if (fd) in jffs2_lookup() 103 ino = fd->ino; in jffs2_lookup() 121 struct jffs2_full_dirent *fd; in jffs2_readdir() local 147 for (fd = f->dents; fd; fd = fd->next) { in jffs2_readdir() 153 fd->name, fd->ino, fd->type, curofs, offset); in jffs2_readdir() 156 if (!fd->ino) { in jffs2_readdir() 158 fd->name); in jffs2_readdir() [all …]
|
/fs/hostfs/ |
D | hostfs_user.c | 40 int stat_file(const char *path, struct hostfs_stat *p, int fd) in stat_file() argument 44 if (fd >= 0) { in stat_file() 45 if (fstat64(fd, &buf) < 0) in stat_file() 71 int mode = 0, fd; in open_file() local 83 fd = open64(path, mode); in open_file() 84 if (fd < 0) in open_file() 86 else return fd; in open_file() 117 int read_file(int fd, unsigned long long *offset, char *buf, int len) in read_file() argument 121 n = pread64(fd, buf, len, *offset); in read_file() 128 int write_file(int fd, unsigned long long *offset, const char *buf, int len) in write_file() argument [all …]
|
/fs/proc/ |
D | fd.c | 32 int fd = proc_fd(m->private); in seq_show() local 35 file = fcheck_files(files, fd); in seq_show() 40 if (close_on_exec(fd, fdt)) in seq_show() 79 int fd; in tid_fd_revalidate() local 86 fd = proc_fd(inode); in tid_fd_revalidate() 94 file = fcheck_files(files, fd); in tid_fd_revalidate() 153 int fd = proc_fd(dentry->d_inode); in proc_fd_link() local 157 fd_file = fcheck_files(files, fd); in proc_fd_link() 175 unsigned fd = (unsigned long)ptr; in proc_fd_instantiate() local 184 ei->fd = fd; in proc_fd_instantiate() [all …]
|
/fs/notify/fanotify/ |
D | fanotify_user.c | 34 __s32 fd; member 128 metadata->fd = FAN_NOFD; in fill_event_metadata() 130 metadata->fd = create_fd(group, event, file); in fill_event_metadata() 131 if (metadata->fd < 0) in fill_event_metadata() 132 ret = metadata->fd; in fill_event_metadata() 140 __s32 fd) in dequeue_re() argument 146 if (re->fd != fd) in dequeue_re() 164 __s32 fd = response_struct->fd; in process_access_response() local 168 fd, response); in process_access_response() 182 if (fd < 0) in process_access_response() [all …]
|