Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 33) sorted by relevance

12

/mm/
Dmemfd.c136 static unsigned int *memfd_file_seals_ptr(struct file *file) in memfd_file_seals_ptr() argument
138 if (shmem_file(file)) in memfd_file_seals_ptr()
139 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr()
142 if (is_file_hugepages(file)) in memfd_file_seals_ptr()
143 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr()
155 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument
157 struct inode *inode = file_inode(file); in memfd_add_seals()
192 if (!(file->f_mode & FMODE_WRITE)) in memfd_add_seals()
199 file_seals = memfd_file_seals_ptr(file); in memfd_add_seals()
211 error = mapping_deny_writable(file->f_mapping); in memfd_add_seals()
[all …]
Dfadvise.c32 int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) in generic_fadvise() argument
42 inode = file_inode(file); in generic_fadvise()
46 mapping = file->f_mapping; in generic_fadvise()
81 file->f_ra.ra_pages = bdi->ra_pages; in generic_fadvise()
82 spin_lock(&file->f_lock); in generic_fadvise()
83 file->f_mode &= ~FMODE_RANDOM; in generic_fadvise()
84 spin_unlock(&file->f_lock); in generic_fadvise()
87 spin_lock(&file->f_lock); in generic_fadvise()
88 file->f_mode |= FMODE_RANDOM; in generic_fadvise()
89 spin_unlock(&file->f_lock); in generic_fadvise()
[all …]
Dmmap.c144 struct file *file, struct address_space *mapping) in __remove_shared_vm_struct() argument
147 allow_write_access(file); in __remove_shared_vm_struct()
162 struct file *file = vma->vm_file; in unlink_file_vma() local
164 if (file) { in unlink_file_vma()
165 struct address_space *mapping = file->f_mapping; in unlink_file_vma()
167 __remove_shared_vm_struct(vma, file, mapping); in unlink_file_vma()
698 struct file *file; in __vma_link_file() local
700 file = vma->vm_file; in __vma_link_file()
701 if (file) { in __vma_link_file()
702 struct address_space *mapping = file->f_mapping; in __vma_link_file()
[all …]
Dfilemap.c602 int file_fdatawait_range(struct file *file, loff_t start_byte, loff_t end_byte) in file_fdatawait_range() argument
604 struct address_space *mapping = file->f_mapping; in file_fdatawait_range()
607 return file_check_and_advance_wb_err(file); in file_fdatawait_range()
716 int file_check_and_advance_wb_err(struct file *file) in file_check_and_advance_wb_err() argument
719 errseq_t old = READ_ONCE(file->f_wb_err); in file_check_and_advance_wb_err()
720 struct address_space *mapping = file->f_mapping; in file_check_and_advance_wb_err()
725 spin_lock(&file->f_lock); in file_check_and_advance_wb_err()
726 old = file->f_wb_err; in file_check_and_advance_wb_err()
728 &file->f_wb_err); in file_check_and_advance_wb_err()
729 trace_file_check_and_advance_wb_err(file, old); in file_check_and_advance_wb_err()
[all …]
Dnommu.c755 static int validate_mmap_request(struct file *file, in validate_mmap_request() argument
786 if (file) { in validate_mmap_request()
788 if (!file->f_op->mmap) in validate_mmap_request()
795 if (file->f_op->mmap_capabilities) { in validate_mmap_request()
796 capabilities = file->f_op->mmap_capabilities(file); in validate_mmap_request()
800 switch (file_inode(file)->i_mode & S_IFMT) { in validate_mmap_request()
820 if (!file->f_op->get_unmapped_area) in validate_mmap_request()
822 if (!(file->f_mode & FMODE_CAN_READ)) in validate_mmap_request()
826 if (!(file->f_mode & FMODE_READ)) in validate_mmap_request()
832 !(file->f_mode & FMODE_WRITE)) in validate_mmap_request()
[all …]
Dmsync.c63 struct file *file; in SYSCALL_DEFINE3() local
83 file = vma->vm_file; in SYSCALL_DEFINE3()
88 if ((flags & MS_SYNC) && file && in SYSCALL_DEFINE3()
90 get_file(file); in SYSCALL_DEFINE3()
92 error = vfs_fsync_range(file, fstart, fend, 1); in SYSCALL_DEFINE3()
93 fput(file); in SYSCALL_DEFINE3()
Dreadahead.c147 aops->readpages(rac->file, rac->mapping, pages, in read_pages()
155 aops->readpage(rac->file, page); in read_pages()
567 bool do_forced_ra = ractl->file && (ractl->file->f_mode & FMODE_RANDOM); in page_cache_sync_ra()
576 if (!ractl->file) in page_cache_sync_ra()
630 if (!f.file || !(f.file->f_mode & FMODE_READ)) in ksys_readahead()
639 if (!f.file->f_mapping || !f.file->f_mapping->a_ops || in ksys_readahead()
640 (!S_ISREG(file_inode(f.file)->i_mode) && in ksys_readahead()
641 !S_ISBLK(file_inode(f.file)->i_mode))) in ksys_readahead()
644 ret = vfs_fadvise(f.file, offset, count, POSIX_FADV_WILLNEED); in ksys_readahead()
Dshmem.c2100 struct file *fpin; in shmem_fault()
2148 unsigned long shmem_get_unmapped_area(struct file *file, in shmem_get_unmapped_area() argument
2152 unsigned long (*get_area)(struct file *, in shmem_get_unmapped_area()
2164 addr = get_area(file, uaddr, len, pgoff, flags); in shmem_get_unmapped_area()
2193 if (file) { in shmem_get_unmapped_area()
2194 VM_BUG_ON(file->f_op != &shmem_file_operations); in shmem_get_unmapped_area()
2195 sb = file_inode(file)->i_sb; in shmem_get_unmapped_area()
2255 int shmem_lock(struct file *file, int lock, struct user_struct *user) in shmem_lock() argument
2257 struct inode *inode = file_inode(file); in shmem_lock()
2270 mapping_set_unevictable(file->f_mapping); in shmem_lock()
[all …]
Dworkingset.c284 bool file = page_is_file_lru(page); in workingset_refault() local
351 inc_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file); in workingset_refault()
361 if (!file) { in workingset_refault()
368 if (file) { in workingset_refault()
378 inc_lruvec_state(lruvec, WORKINGSET_ACTIVATE_BASE + file); in workingset_refault()
387 inc_lruvec_state(lruvec, WORKINGSET_RESTORE_BASE + file); in workingset_refault()
Dinternal.h77 struct file *file, pgoff_t index, unsigned long nr_to_read) in force_page_cache_readahead() argument
79 DEFINE_READAHEAD(ractl, file, mapping, index); in force_page_cache_readahead()
80 force_page_cache_ra(&ractl, &file->f_ra, nr_to_read); in force_page_cache_readahead()
450 static inline struct file *maybe_unlock_mmap_for_io(struct vm_fault *vmf, in maybe_unlock_mmap_for_io()
451 struct file *fpin) in maybe_unlock_mmap_for_io()
580 extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long,
Dpage_idle.c118 static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj, in page_idle_bitmap_read() argument
163 static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, in page_idle_bitmap_write() argument
Dmadvise.c267 struct file *file = vma->vm_file; in madvise_willneed() local
272 if (!file) { in madvise_willneed()
278 if (shmem_mapping(file->f_mapping)) { in madvise_willneed()
280 file->f_mapping); in madvise_willneed()
284 if (!file) in madvise_willneed()
288 if (IS_DAX(file_inode(file))) { in madvise_willneed()
300 get_file(file); in madvise_willneed()
304 vfs_fadvise(file, offset, end - start, POSIX_FADV_WILLNEED); in madvise_willneed()
305 fput(file); in madvise_willneed()
867 struct file *f; in madvise_remove()
Dutil.c531 unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, in vm_mmap_pgoff() argument
540 ret = security_mmap_file(file, prot, flag); in vm_mmap_pgoff()
544 ret = do_mmap(file, addr, len, prot, flag, pgoff, &populate, in vm_mmap_pgoff()
551 trace_android_vh_check_mmap_file(file, prot, flag, ret); in vm_mmap_pgoff()
555 unsigned long vm_mmap(struct file *file, unsigned long addr, in vm_mmap() argument
564 return vm_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); in vm_mmap()
Dkhugepaged.c1687 struct file *file, pgoff_t start, in collapse_file() argument
1690 struct address_space *mapping = file->f_mapping; in collapse_file()
1697 bool is_shmem = shmem_file(file); in collapse_file()
1788 page_cache_sync_readahead(mapping, &file->f_ra, in collapse_file()
1789 file, index, in collapse_file()
2037 struct file *file, pgoff_t start, struct page **hpage) in khugepaged_scan_file() argument
2040 struct address_space *mapping = file->f_mapping; in khugepaged_scan_file()
2105 collapse_file(mm, file, start, hpage, node); in khugepaged_scan_file()
2113 struct file *file, pgoff_t start, struct page **hpage) in khugepaged_scan_file() argument
2195 struct file *file = get_file(vma->vm_file); in khugepaged_scan_mm_slot() local
[all …]
Dvmscan.c1862 static int too_many_isolated(struct pglist_data *pgdat, int file, in too_many_isolated() argument
1873 if (file) { in too_many_isolated()
1993 bool file = is_file_lru(lru); in shrink_inactive_list() local
1998 while (unlikely(too_many_isolated(pgdat, file, sc))) { in shrink_inactive_list()
2018 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken); in shrink_inactive_list()
2023 __count_vm_events(PGSCAN_ANON + file, nr_scanned); in shrink_inactive_list()
2037 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken); in shrink_inactive_list()
2038 lru_note_cost(lruvec, file, stat.nr_pageout); in shrink_inactive_list()
2043 __count_vm_events(PGSTEAL_ANON + file, nr_reclaimed); in shrink_inactive_list()
2069 if (file) in shrink_inactive_list()
[all …]
Dpage_pinner.c381 read_longterm_page_pinner(struct file *file, char __user *buf, size_t count, in read_longterm_page_pinner() argument
416 static ssize_t read_alloc_contig_failed(struct file *file, char __user *buf, in read_alloc_contig_failed() argument
Dswapfile.c2371 struct file *swap_file = sis->swap_file; in destroy_swap_extents()
2459 struct file *swap_file = sis->swap_file; in setup_swap_extents()
2601 struct file *swap_file, *victim; in SYSCALL_DEFINE1()
2781 static __poll_t swaps_poll(struct file *file, poll_table *wait) in swaps_poll() argument
2783 struct seq_file *seq = file->private_data; in swaps_poll()
2785 poll_wait(file, &proc_poll_wait, wait); in swaps_poll()
2845 struct file *file; in swap_show() local
2857 file = si->swap_file; in swap_show()
2858 len = seq_file_path(swap, file, " \t\n\\"); in swap_show()
2861 S_ISBLK(file_inode(file)->i_mode) ? in swap_show()
[all …]
Dpage_io.c99 struct file *swap_file, in generic_swapfile_activate()
265 struct file *swap_file = sis->swap_file; in __swap_writepage()
358 struct file *swap_file = sis->swap_file; in swap_readpage()
Dslab.h198 struct file;
215 ssize_t slabinfo_write(struct file *file, const char __user *buffer,
Dkmemleak.c1707 static int kmemleak_open(struct inode *inode, struct file *file) in kmemleak_open() argument
1709 return seq_open(file, &kmemleak_seq_ops); in kmemleak_open()
1776 static ssize_t kmemleak_write(struct file *file, const char __user *user_buf, in kmemleak_write() argument
Dslab_common.c1065 static int slabinfo_open(struct inode *inode, struct file *file) in slabinfo_open() argument
1067 return seq_open(file, &slabinfo_op); in slabinfo_open()
Dpage_owner.c510 read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos) in read_page_owner() argument
Dgup_benchmark.c167 static long gup_benchmark_ioctl(struct file *filep, unsigned int cmd, in gup_benchmark_ioctl()
/mm/damon/
Ddbgfs.c49 static ssize_t dbgfs_attrs_read(struct file *file, in dbgfs_attrs_read() argument
52 struct damon_ctx *ctx = file->private_data; in dbgfs_attrs_read()
66 static ssize_t dbgfs_attrs_write(struct file *file, in dbgfs_attrs_write() argument
69 struct damon_ctx *ctx = file->private_data; in dbgfs_attrs_write()
131 static ssize_t dbgfs_schemes_read(struct file *file, char __user *buf, in dbgfs_schemes_read() argument
134 struct damon_ctx *ctx = file->private_data; in dbgfs_schemes_read()
240 static ssize_t dbgfs_schemes_write(struct file *file, const char __user *buf, in dbgfs_schemes_write() argument
243 struct damon_ctx *ctx = file->private_data; in dbgfs_schemes_write()
307 static ssize_t dbgfs_target_ids_read(struct file *file, in dbgfs_target_ids_read() argument
310 struct damon_ctx *ctx = file->private_data; in dbgfs_target_ids_read()
[all …]
/mm/kfence/
Dcore.c568 static int open_objects(struct inode *inode, struct file *file) in open_objects() argument
570 return seq_open(file, &object_seqops); in open_objects()

12