/fs/ |
D | file_table.c | 47 struct file *f = container_of(head, struct file, f_u.fu_rcuhead); in file_free_rcu() local 49 put_cred(f->f_cred); in file_free_rcu() 50 kmem_cache_free(filp_cachep, f); in file_free_rcu() 53 static inline void file_free(struct file *f) in file_free() argument 55 security_file_free(f); in file_free() 56 if (!(f->f_mode & FMODE_NOACCOUNT)) in file_free() 58 call_rcu(&f->f_u.fu_rcuhead, file_free_rcu); in file_free() 98 struct file *f; in __alloc_file() local 101 f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL); in __alloc_file() 102 if (unlikely(!f)) in __alloc_file() [all …]
|
D | open.c | 160 struct fd f; in do_sys_ftruncate() local 167 f = fdget(fd); in do_sys_ftruncate() 168 if (!f.file) in do_sys_ftruncate() 172 if (f.file->f_flags & O_LARGEFILE) in do_sys_ftruncate() 175 dentry = f.file->f_path.dentry; in do_sys_ftruncate() 178 if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE)) in do_sys_ftruncate() 188 if (IS_APPEND(file_inode(f.file))) in do_sys_ftruncate() 192 error = locks_verify_truncate(inode, f.file, length); in do_sys_ftruncate() 194 error = security_path_truncate(&f.file->f_path); in do_sys_ftruncate() 196 error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, f.file); in do_sys_ftruncate() [all …]
|
D | sync.c | 165 struct fd f = fdget(fd); in SYSCALL_DEFINE1() local 169 if (!f.file) in SYSCALL_DEFINE1() 171 sb = f.file->f_path.dentry->d_sb; in SYSCALL_DEFINE1() 177 ret2 = errseq_check_and_advance(&sb->s_wb_err, &f.file->f_sb_err); in SYSCALL_DEFINE1() 179 fdput(f); in SYSCALL_DEFINE1() 222 struct fd f = fdget(fd); in do_fsync() local 225 if (f.file) { in do_fsync() 226 ret = vfs_fsync(f.file, datasync); in do_fsync() 227 fdput(f); in do_fsync() 374 struct fd f; in ksys_sync_file_range() local [all …]
|
D | readdir.c | 184 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local 190 if (!f.file) in SYSCALL_DEFINE3() 193 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3() 197 fdput_pos(f); in SYSCALL_DEFINE3() 274 struct fd f; in SYSCALL_DEFINE3() local 282 f = fdget_pos(fd); in SYSCALL_DEFINE3() 283 if (!f.file) in SYSCALL_DEFINE3() 286 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3() 298 fdput_pos(f); in SYSCALL_DEFINE3() 357 struct fd f; in SYSCALL_DEFINE3() local [all …]
|
D | read_write.c | 307 struct fd f = fdget_pos(fd); in ksys_lseek() local 308 if (!f.file) in ksys_lseek() 313 loff_t res = vfs_llseek(f.file, offset, whence); in ksys_lseek() 318 fdput_pos(f); in ksys_lseek() 341 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE5() local 344 if (!f.file) in SYSCALL_DEFINE5() 351 offset = vfs_llseek(f.file, ((loff_t) offset_high << 32) | offset_low, in SYSCALL_DEFINE5() 361 fdput_pos(f); in SYSCALL_DEFINE5() 625 struct fd f = fdget_pos(fd); in ksys_read() local 628 if (f.file) { in ksys_read() [all …]
|
D | locks.c | 447 struct file_lock *f; in locks_move_blocks() local 458 list_for_each_entry(f, &new->fl_blocked_requests, fl_blocked_member) in locks_move_blocks() 459 f->fl_blocker = new; in locks_move_blocks() 2221 struct fd f = fdget(fd); in SYSCALL_DEFINE2() local 2227 if (!f.file) in SYSCALL_DEFINE2() 2235 !(f.file->f_mode & (FMODE_READ|FMODE_WRITE))) in SYSCALL_DEFINE2() 2238 lock = flock_make_lock(f.file, cmd, NULL); in SYSCALL_DEFINE2() 2247 error = security_file_lock(f.file, lock->fl_type); in SYSCALL_DEFINE2() 2251 if (f.file->f_op->flock) in SYSCALL_DEFINE2() 2252 error = f.file->f_op->flock(f.file, in SYSCALL_DEFINE2() [all …]
|
D | ioctl.c | 741 struct fd f = fdget(fd); in SYSCALL_DEFINE3() local 744 if (!f.file) in SYSCALL_DEFINE3() 747 error = security_file_ioctl(f.file, cmd, arg); in SYSCALL_DEFINE3() 751 error = do_vfs_ioctl(f.file, fd, cmd, arg); in SYSCALL_DEFINE3() 753 error = vfs_ioctl(f.file, cmd, arg); in SYSCALL_DEFINE3() 756 fdput(f); in SYSCALL_DEFINE3() 796 struct fd f = fdget(fd); in COMPAT_SYSCALL_DEFINE3() local 799 if (!f.file) in COMPAT_SYSCALL_DEFINE3() 802 error = security_file_ioctl_compat(f.file, cmd, arg); in COMPAT_SYSCALL_DEFINE3() 809 error = ioctl_file_clone(f.file, arg, 0, 0, 0); in COMPAT_SYSCALL_DEFINE3() [all …]
|
D | fcntl.c | 458 struct fd f = fdget_raw(fd); in SYSCALL_DEFINE3() local 461 if (!f.file) in SYSCALL_DEFINE3() 464 if (unlikely(f.file->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3() 469 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3() 471 err = do_fcntl(fd, cmd, arg, f.file); in SYSCALL_DEFINE3() 474 fdput(f); in SYSCALL_DEFINE3() 484 struct fd f = fdget_raw(fd); in SYSCALL_DEFINE3() local 488 if (!f.file) in SYSCALL_DEFINE3() 491 if (unlikely(f.file->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3() 496 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3() [all …]
|
D | xattr.c | 595 struct fd f = fdget(fd); in SYSCALL_DEFINE5() local 598 if (!f.file) in SYSCALL_DEFINE5() 600 audit_file(f.file); in SYSCALL_DEFINE5() 601 error = mnt_want_write_file(f.file); in SYSCALL_DEFINE5() 603 error = setxattr(f.file->f_path.dentry, name, value, size, flags); in SYSCALL_DEFINE5() 604 mnt_drop_write_file(f.file); in SYSCALL_DEFINE5() 606 fdput(f); in SYSCALL_DEFINE5() 687 struct fd f = fdget(fd); in SYSCALL_DEFINE4() local 690 if (!f.file) in SYSCALL_DEFINE4() 692 audit_file(f.file); in SYSCALL_DEFINE4() [all …]
|
D | fs_parser.c | 148 struct filename *f; in fs_lookup_param() local 155 f = getname_kernel(param->string); in fs_lookup_param() 156 if (IS_ERR(f)) in fs_lookup_param() 157 return PTR_ERR(f); in fs_lookup_param() 161 f = param->name; in fs_lookup_param() 168 f->refcnt++; /* filename_lookup() drops our ref. */ in fs_lookup_param() 169 ret = filename_lookup(param->dirfd, f, flags, _path, NULL); in fs_lookup_param() 171 errorf(fc, "%s: Lookup failure for '%s'", param->key, f->name); in fs_lookup_param() 181 param->key, f->name); in fs_lookup_param() 187 putname(f); in fs_lookup_param()
|
/fs/jffs2/ |
D | gc.c | 29 struct jffs2_inode_info *f, struct jffs2_full_dnode *fd); 31 struct jffs2_inode_info *f, struct jffs2_full_dirent *fd); 33 struct jffs2_inode_info *f, struct jffs2_full_dirent *fd); 35 struct jffs2_inode_info *f, struct jffs2_full_dnode *fn, 38 struct jffs2_inode_info *f, struct jffs2_full_dnode *fn, 41 struct jffs2_raw_node_ref *raw, struct jffs2_inode_info *f); 126 struct jffs2_inode_info *f; in jffs2_garbage_collect_pass() local 454 f = jffs2_gc_fetch_inode(c, inum, !nlink); in jffs2_garbage_collect_pass() 455 if (IS_ERR(f)) { in jffs2_garbage_collect_pass() 456 ret = PTR_ERR(f); in jffs2_garbage_collect_pass() [all …]
|
D | readinode.c | 452 struct jffs2_inode_info *f, in jffs2_build_inode_fragtree() argument 518 ret = jffs2_add_full_dnode_to_inode(c, f, this->fn); in jffs2_build_inode_fragtree() 981 static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, in jffs2_get_inode_nodes() argument 992 dbg_readinode("ino #%u\n", f->inocache->ino); in jffs2_get_inode_nodes() 1002 valid_ref = jffs2_first_valid_node(f->inocache->nodes); in jffs2_get_inode_nodes() 1003 if (!valid_ref && f->inocache->ino != 1) in jffs2_get_inode_nodes() 1004 JFFS2_WARNING("Eep. No valid nodes for ino #%u.\n", f->inocache->ino); in jffs2_get_inode_nodes() 1130 f->highest_version = rii->highest_version; in jffs2_get_inode_nodes() 1133 f->inocache->ino, rii->highest_version, rii->latest_mctime, in jffs2_get_inode_nodes() 1146 struct jffs2_inode_info *f, in jffs2_do_read_inode_internal() argument [all …]
|
D | os-linux.h | 23 #define OFNI_EDONI_2SFFJ(f) (&(f)->vfs_inode) argument 28 #define JFFS2_F_I_SIZE(f) (OFNI_EDONI_2SFFJ(f)->i_size) argument 29 #define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode) argument 30 #define JFFS2_F_I_UID(f) (i_uid_read(OFNI_EDONI_2SFFJ(f))) argument 31 #define JFFS2_F_I_GID(f) (i_gid_read(OFNI_EDONI_2SFFJ(f))) argument 32 #define JFFS2_F_I_RDEV(f) (OFNI_EDONI_2SFFJ(f)->i_rdev) argument 38 #define JFFS2_F_I_CTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_ctime) argument 39 #define JFFS2_F_I_MTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_mtime) argument 40 #define JFFS2_F_I_ATIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_atime) argument 51 static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) in jffs2_init_inode_info() argument [all …]
|
D | write.c | 23 int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, in jffs2_do_new_inode() argument 35 f->inocache = ic; in jffs2_do_new_inode() 36 f->inocache->pino_nlink = 1; /* Will be overwritten shortly for directories */ in jffs2_do_new_inode() 37 f->inocache->nodes = (struct jffs2_raw_node_ref *)f->inocache; in jffs2_do_new_inode() 38 f->inocache->state = INO_STATE_PRESENT; in jffs2_do_new_inode() 40 jffs2_add_ino_cache(c, f->inocache); in jffs2_do_new_inode() 41 jffs2_dbg(1, "%s(): Assigned ino# %d\n", __func__, f->inocache->ino); in jffs2_do_new_inode() 42 ri->ino = cpu_to_je32(f->inocache->ino); in jffs2_do_new_inode() 50 f->highest_version = 1; in jffs2_do_new_inode() 51 ri->version = cpu_to_je32(f->highest_version); in jffs2_do_new_inode() [all …]
|
D | fs.c | 35 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); in jffs2_do_setattr() local 60 mutex_lock(&f->sem); in jffs2_do_setattr() 61 mdatalen = f->metadata->size; in jffs2_do_setattr() 62 mdata = kmalloc(f->metadata->size, GFP_USER); in jffs2_do_setattr() 64 mutex_unlock(&f->sem); in jffs2_do_setattr() 67 ret = jffs2_read_dnode(c, f, f->metadata, mdata, 0, mdatalen); in jffs2_do_setattr() 69 mutex_unlock(&f->sem); in jffs2_do_setattr() 73 mutex_unlock(&f->sem); in jffs2_do_setattr() 93 mutex_lock(&f->sem); in jffs2_do_setattr() 102 ri->version = cpu_to_je32(++f->highest_version); in jffs2_do_setattr() [all …]
|
D | dir.c | 123 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); in jffs2_readdir() local 132 mutex_lock(&f->sem); in jffs2_readdir() 133 for (fd = f->dents; fd; fd = fd->next) { in jffs2_readdir() 153 mutex_unlock(&f->sem); in jffs2_readdir() 164 struct jffs2_inode_info *f, *dir_f; in jffs2_create() local 190 f = JFFS2_INODE_INFO(inode); in jffs2_create() 198 mutex_unlock(&f->sem); in jffs2_create() 200 ret = jffs2_do_create(c, dir_f, f, ri, &dentry->d_name); in jffs2_create() 210 f->inocache->pino_nlink, inode->i_mapping->nrpages); in jffs2_create() 246 struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode(old_dentry)); in jffs2_link() local [all …]
|
D | file.c | 82 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); in jffs2_do_readpage_nolock() local 95 ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_SHIFT, in jffs2_do_readpage_nolock() 123 struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host); in jffs2_readpage() local 126 mutex_lock(&f->sem); in jffs2_readpage() 128 mutex_unlock(&f->sem); in jffs2_readpage() 138 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); in jffs2_write_begin() local 159 mutex_lock(&f->sem); in jffs2_write_begin() 167 ri.ino = cpu_to_je32(f->inocache->ino); in jffs2_write_begin() 168 ri.version = cpu_to_je32(++f->highest_version); in jffs2_write_begin() 181 fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL); in jffs2_write_begin() [all …]
|
D | debug.h | 181 __jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f); 183 __jffs2_dbg_fragtree_paranoia_check_nolock(struct jffs2_inode_info *f); 210 __jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f); 212 __jffs2_dbg_dump_fragtree_nolock(struct jffs2_inode_info *f); 219 #define jffs2_dbg_fragtree_paranoia_check(f) \ argument 220 __jffs2_dbg_fragtree_paranoia_check(f) 221 #define jffs2_dbg_fragtree_paranoia_check_nolock(f) \ argument 222 __jffs2_dbg_fragtree_paranoia_check_nolock(f) 230 #define jffs2_dbg_fragtree_paranoia_check(f) argument 231 #define jffs2_dbg_fragtree_paranoia_check_nolock(f) argument [all …]
|
D | super.c | 40 struct jffs2_inode_info *f; in jffs2_alloc_inode() local 42 f = kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL); in jffs2_alloc_inode() 43 if (!f) in jffs2_alloc_inode() 45 return &f->vfs_inode; in jffs2_alloc_inode() 50 struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); in jffs2_free_inode() local 52 kfree(f->target); in jffs2_free_inode() 53 kmem_cache_free(jffs2_inode_cachep, f); in jffs2_free_inode() 58 struct jffs2_inode_info *f = foo; in jffs2_i_init_once() local 60 mutex_init(&f->sem); in jffs2_i_init_once() 61 inode_init_once(&f->vfs_inode); in jffs2_i_init_once() [all …]
|
/fs/notify/ |
D | fdinfo.c | 24 static void show_fdinfo(struct seq_file *m, struct file *f, in show_fdinfo() argument 28 struct fsnotify_group *group = f->private_data; in show_fdinfo() 46 } f; in show_mark_fhandle() local 49 f.handle.handle_bytes = sizeof(f.pad); in show_mark_fhandle() 50 size = f.handle.handle_bytes >> 2; in show_mark_fhandle() 52 ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, NULL); in show_mark_fhandle() 58 f.handle.handle_type = ret; in show_mark_fhandle() 59 f.handle.handle_bytes = size * sizeof(u32); in show_mark_fhandle() 62 f.handle.handle_bytes, f.handle.handle_type); in show_mark_fhandle() 64 for (i = 0; i < f.handle.handle_bytes; i++) in show_mark_fhandle() [all …]
|
/fs/proc/ |
D | devices.c | 8 static int devinfo_show(struct seq_file *f, void *v) in devinfo_show() argument 14 seq_puts(f, "Character devices:\n"); in devinfo_show() 15 chrdev_show(f, i); in devinfo_show() 21 seq_puts(f, "\nBlock devices:\n"); in devinfo_show() 22 blkdev_show(f, i); in devinfo_show() 28 static void *devinfo_start(struct seq_file *f, loff_t *pos) in devinfo_start() argument 35 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos) in devinfo_next() argument 43 static void devinfo_stop(struct seq_file *f, void *v) in devinfo_stop() argument
|
/fs/ntfs/ |
D | debug.h | 30 #define ntfs_debug(f, a...) \ argument 31 __ntfs_debug(__FILE__, __LINE__, __func__, f, ##a) 50 #define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a) argument 55 #define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a) argument
|
/fs/lockd/ |
D | svcsubs.c | 36 static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f) in nlm_debug_print_fh() argument 38 u32 *fhp = (u32*)f->data; in nlm_debug_print_fh() 54 static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f) in nlm_debug_print_fh() argument 65 static inline unsigned int file_hash(struct nfs_fh *f) in file_hash() argument 70 tmp += f->data[i]; in file_hash() 85 struct nfs_fh *f) in nlm_lookup_file() argument 91 nlm_debug_print_fh("nlm_lookup_file", f); in nlm_lookup_file() 93 hash = file_hash(f); in nlm_lookup_file() 99 if (!nfs_compare_fh(&file->f_handle, f)) in nlm_lookup_file() 102 nlm_debug_print_fh("creating file for", f); in nlm_lookup_file() [all …]
|
/fs/openpromfs/ |
D | inode.c | 67 static int property_show(struct seq_file *f, void *v) in property_show() argument 69 struct property *prop = f->private; in property_show() 80 seq_printf(f, "%s", (char *) pval); in property_show() 87 seq_printf(f, " + "); in property_show() 94 seq_printf(f, "%02x.", in property_show() 97 seq_printf(f, "%02x", in property_show() 106 seq_printf(f, "%08x.", in property_show() 109 seq_printf(f, "%08x", in property_show() 115 seq_printf(f, "\n"); in property_show() 120 static void *property_start(struct seq_file *f, loff_t *pos) in property_start() argument [all …]
|
/fs/nfsd/ |
D | auth.c | 10 struct exp_flavor_info *f; in nfsexp_flags() local 13 for (f = exp->ex_flavors; f < end; f++) { in nfsexp_flags() 14 if (f->pseudoflavor == rqstp->rq_cred.cr_flavor) in nfsexp_flags() 15 return f->flags; in nfsexp_flags()
|