Home
last modified time | relevance | path

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

12

/mm/
Dfilemap.c503 int file_fdatawait_range(struct file *file, loff_t start_byte, loff_t end_byte) in file_fdatawait_range() argument
505 struct address_space *mapping = file->f_mapping; in file_fdatawait_range()
508 return file_check_and_advance_wb_err(file); in file_fdatawait_range()
630 int file_check_and_advance_wb_err(struct file *file) in file_check_and_advance_wb_err() argument
633 errseq_t old = READ_ONCE(file->f_wb_err); in file_check_and_advance_wb_err()
634 struct address_space *mapping = file->f_mapping; in file_check_and_advance_wb_err()
639 spin_lock(&file->f_lock); in file_check_and_advance_wb_err()
640 old = file->f_wb_err; in file_check_and_advance_wb_err()
642 &file->f_wb_err); in file_check_and_advance_wb_err()
643 trace_file_check_and_advance_wb_err(file, old); in file_check_and_advance_wb_err()
[all …]
Dfadvise.c41 if (!f.file) in SYSCALL_DEFINE4()
44 inode = file_inode(f.file); in SYSCALL_DEFINE4()
50 mapping = f.file->f_mapping; in SYSCALL_DEFINE4()
87 f.file->f_ra.ra_pages = bdi->ra_pages; in SYSCALL_DEFINE4()
88 spin_lock(&f.file->f_lock); in SYSCALL_DEFINE4()
89 f.file->f_mode &= ~FMODE_RANDOM; in SYSCALL_DEFINE4()
90 spin_unlock(&f.file->f_lock); in SYSCALL_DEFINE4()
93 spin_lock(&f.file->f_lock); in SYSCALL_DEFINE4()
94 f.file->f_mode |= FMODE_RANDOM; in SYSCALL_DEFINE4()
95 spin_unlock(&f.file->f_lock); in SYSCALL_DEFINE4()
[all …]
Dmmap.c130 struct file *file, struct address_space *mapping) in __remove_shared_vm_struct() argument
133 atomic_inc(&file_inode(file)->i_writecount); in __remove_shared_vm_struct()
148 struct file *file = vma->vm_file; in unlink_file_vma() local
150 if (file) { in unlink_file_vma()
151 struct address_space *mapping = file->f_mapping; in unlink_file_vma()
153 __remove_shared_vm_struct(vma, file, mapping); in unlink_file_vma()
573 struct file *file; in __vma_link_file() local
575 file = vma->vm_file; in __vma_link_file()
576 if (file) { in __vma_link_file()
577 struct address_space *mapping = file->f_mapping; in __vma_link_file()
[all …]
Dnommu.c893 static int validate_mmap_request(struct file *file, in validate_mmap_request() argument
924 if (file) { in validate_mmap_request()
926 if (!file->f_op->mmap) in validate_mmap_request()
933 if (file->f_op->mmap_capabilities) { in validate_mmap_request()
934 capabilities = file->f_op->mmap_capabilities(file); in validate_mmap_request()
938 switch (file_inode(file)->i_mode & S_IFMT) { in validate_mmap_request()
958 if (!file->f_op->get_unmapped_area) in validate_mmap_request()
960 if (!(file->f_mode & FMODE_CAN_READ)) in validate_mmap_request()
964 if (!(file->f_mode & FMODE_READ)) in validate_mmap_request()
970 !(file->f_mode & FMODE_WRITE)) in validate_mmap_request()
[all …]
Dshmem.c2019 unsigned long shmem_get_unmapped_area(struct file *file, in shmem_get_unmapped_area() argument
2023 unsigned long (*get_area)(struct file *, in shmem_get_unmapped_area()
2035 addr = get_area(file, uaddr, len, pgoff, flags); in shmem_get_unmapped_area()
2064 if (file) { in shmem_get_unmapped_area()
2065 VM_BUG_ON(file->f_op != &shmem_file_operations); in shmem_get_unmapped_area()
2066 sb = file_inode(file)->i_sb; in shmem_get_unmapped_area()
2126 int shmem_lock(struct file *file, int lock, struct user_struct *user) in shmem_lock() argument
2128 struct inode *inode = file_inode(file); in shmem_lock()
2137 mapping_set_unevictable(file->f_mapping); in shmem_lock()
2142 mapping_clear_unevictable(file->f_mapping); in shmem_lock()
[all …]
Dmsync.c61 struct file *file; in SYSCALL_DEFINE3() local
81 file = vma->vm_file; in SYSCALL_DEFINE3()
86 if ((flags & MS_SYNC) && file && in SYSCALL_DEFINE3()
88 get_file(file); in SYSCALL_DEFINE3()
90 error = vfs_fsync_range(file, fstart, fend, 1); in SYSCALL_DEFINE3()
91 fput(file); in SYSCALL_DEFINE3()
Dreadahead.c84 int (*filler)(struct file *, struct page *), void *data) in read_cache_pages() argument
111 static int read_pages(struct address_space *mapping, struct file *filp, in read_pages()
150 int __do_page_cache_readahead(struct address_space *mapping, struct file *filp, in __do_page_cache_readahead()
209 int force_page_cache_readahead(struct address_space *mapping, struct file *filp, in force_page_cache_readahead()
377 struct file_ra_state *ra, struct file *filp, in ondemand_readahead()
504 struct file_ra_state *ra, struct file *filp, in page_cache_sync_readahead()
539 struct file_ra_state *ra, struct file *filp, in page_cache_async_readahead()
567 do_readahead(struct address_space *mapping, struct file *filp, in do_readahead()
591 if (f.file) { in SYSCALL_DEFINE3()
592 if (f.file->f_mode & FMODE_READ) { in SYSCALL_DEFINE3()
[all …]
Dswap.c264 int file, int rotated) in update_page_reclaim_stat() argument
268 reclaim_stat->recent_scanned[file]++; in update_page_reclaim_stat()
270 reclaim_stat->recent_rotated[file]++; in update_page_reclaim_stat()
277 int file = page_is_file_cache(page); in __activate_page() local
287 update_page_reclaim_stat(lruvec, file, 1); in __activate_page()
530 int lru, file; in lru_deactivate_file_fn() local
544 file = page_is_file_cache(page); in lru_deactivate_file_fn()
570 update_page_reclaim_stat(lruvec, file, 0); in lru_deactivate_file_fn()
847 const int file = 0; in lru_add_page_tail() local
879 update_page_reclaim_stat(lruvec, file, PageActive(page_tail)); in lru_add_page_tail()
[all …]
Dmadvise.c277 struct file *file = vma->vm_file; in madvise_willneed() local
281 if (!file) { in madvise_willneed()
286 if (shmem_mapping(file->f_mapping)) { in madvise_willneed()
288 file->f_mapping); in madvise_willneed()
292 if (!file) in madvise_willneed()
296 if (IS_DAX(file_inode(file))) { in madvise_willneed()
306 force_page_cache_readahead(file->f_mapping, file, start, end - start); in madvise_willneed()
580 struct file *f; in madvise_remove()
Dvmstat.c1446 static int fragmentation_open(struct inode *inode, struct file *file) in fragmentation_open() argument
1448 return seq_open(file, &fragmentation_op); in fragmentation_open()
1465 static int pagetypeinfo_open(struct inode *inode, struct file *file) in pagetypeinfo_open() argument
1467 return seq_open(file, &pagetypeinfo_op); in pagetypeinfo_open()
1599 static int zoneinfo_open(struct inode *inode, struct file *file) in zoneinfo_open() argument
1601 return seq_open(file, &zoneinfo_op); in zoneinfo_open()
1699 static int vmstat_open(struct inode *inode, struct file *file) in vmstat_open() argument
1701 return seq_open(file, &vmstat_op); in vmstat_open()
2034 static int unusable_open(struct inode *inode, struct file *file) in unusable_open() argument
2036 return seq_open(file, &unusable_op); in unusable_open()
[all …]
Dvmscan.c1667 static int too_many_isolated(struct pglist_data *pgdat, int file, in too_many_isolated() argument
1678 if (file) { in too_many_isolated()
1727 int file = is_file_lru(lru); in putback_inactive_pages() local
1729 reclaim_stat->recent_rotated[file] += numpages; in putback_inactive_pages()
1779 int file = is_file_lru(lru); in shrink_inactive_list() local
1784 while (unlikely(too_many_isolated(pgdat, file, sc))) { in shrink_inactive_list()
1807 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken); in shrink_inactive_list()
1808 reclaim_stat->recent_scanned[file] += nr_taken; in shrink_inactive_list()
1845 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken); in shrink_inactive_list()
1924 sc->priority, file); in shrink_inactive_list()
[all …]
Dutil.c320 unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, in vm_mmap_pgoff() argument
329 ret = security_mmap_file(file, prot, flag); in vm_mmap_pgoff()
333 ret = do_mmap_pgoff(file, addr, len, prot, flag, pgoff, in vm_mmap_pgoff()
343 unsigned long vm_mmap(struct file *file, unsigned long addr, in vm_mmap() argument
352 return vm_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); in vm_mmap()
Dpage_idle.c121 static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj, in page_idle_bitmap_read() argument
166 static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, in page_idle_bitmap_write() argument
Dswapfile.c2325 struct file *swap_file = sis->swap_file; in destroy_swap_extents()
2412 struct file *swap_file = sis->swap_file; in setup_swap_extents()
2533 struct file *swap_file, *victim; in SYSCALL_DEFINE1()
2694 static unsigned swaps_poll(struct file *file, poll_table *wait) in swaps_poll() argument
2696 struct seq_file *seq = file->private_data; in swaps_poll()
2698 poll_wait(file, &proc_poll_wait, wait); in swaps_poll()
2762 struct file *file; in swap_show() local
2770 file = si->swap_file; in swap_show()
2771 len = seq_file_path(swap, file, " \t\n\\"); in swap_show()
2774 S_ISBLK(file_inode(file)->i_mode) ? in swap_show()
[all …]
Dinternal.h57 struct file *filp, pgoff_t offset, unsigned long nr_to_read,
64 struct address_space *mapping, struct file *filp) in ra_submit()
477 extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long,
Dpage_io.c148 struct file *swap_file, in generic_swapfile_activate()
288 struct file *swap_file = sis->swap_file; in __swap_writepage()
368 struct file *swap_file = sis->swap_file; in swap_readpage()
Dslab.h175 struct file;
192 ssize_t slabinfo_write(struct file *file, const char __user *buffer,
Dkmemleak.c1757 static int kmemleak_open(struct inode *inode, struct file *file) in kmemleak_open() argument
1759 return seq_open(file, &kmemleak_seq_ops); in kmemleak_open()
1826 static ssize_t kmemleak_write(struct file *file, const char __user *user_buf, in kmemleak_write() argument
Dkhugepaged.c1750 struct file *file; in khugepaged_scan_mm_slot() local
1755 file = get_file(vma->vm_file); in khugepaged_scan_mm_slot()
1758 khugepaged_scan_shmem(mm, file->f_mapping, in khugepaged_scan_mm_slot()
1760 fput(file); in khugepaged_scan_mm_slot()
Dpage_owner.c455 read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos) in read_page_owner() argument
Dbacking-dev.c104 static int bdi_debug_stats_open(struct inode *inode, struct file *file) in bdi_debug_stats_open() argument
106 return single_open(file, bdi_debug_stats_show, inode->i_private); in bdi_debug_stats_open()
Dslab_common.c1342 static int slabinfo_open(struct inode *inode, struct file *file) in slabinfo_open() argument
1344 return seq_open(file, &slabinfo_op); in slabinfo_open()
Dpercpu-stats.c227 static int percpu_stats_open(struct inode *inode, struct file *filp) in percpu_stats_open()
Dmemcontrol.c3842 static void memcg_event_ptable_queue_proc(struct file *file, in memcg_event_ptable_queue_proc() argument
3897 if (!efile.file) { in memcg_write_event_control()
3902 event->eventfd = eventfd_ctx_fileget(efile.file); in memcg_write_event_control()
3909 if (!cfile.file) { in memcg_write_event_control()
3916 ret = inode_permission(file_inode(cfile.file), MAY_READ); in memcg_write_event_control()
3928 name = cfile.file->f_path.dentry->d_name.name; in memcg_write_event_control()
3952 cfile_css = css_tryget_online_from_dir(cfile.file->f_path.dentry->d_parent, in memcg_write_event_control()
3966 efile.file->f_op->poll(efile.file, &event->pt); in memcg_write_event_control()
Dmemblock.c1776 static int memblock_debug_open(struct inode *inode, struct file *file) in memblock_debug_open() argument
1778 return single_open(file, memblock_debug_show, inode->i_private); in memblock_debug_open()

12