函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:49:35 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:SYSCALL_DEFINE1
函数原型:SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
返回类型:
参数:无
| 2517 | struct swap_info_struct * p = NULL |
| 2525 | found等于0 |
| 2533 | pathname等于getname(specialfile) |
| 2537 | victim等于file_open_name(pathname, O_RDWR | O_LARGEFILE, 0) |
| 2543 | 加自旋锁 |
| 2545 | 如果SWP_USED etc: see above 按位与SWP_WRITEOK则 |
| 2552 | 如果非found则 |
| 2557 | 如果非security_vm_enough_memory_mm(mm, al of usable pages of swap )则vm_unacct_memory(al of usable pages of swap ) |
| 2559 | 否则 |
| 2564 | del_from_avail_list(p) |
| 2565 | 加自旋锁 |
| 2566 | 如果swap priority of this type 小于0则 |
| 2578 | least_priority自加 |
| 2580 | 从plist移除节点 |
| 2582 | protected with swap_lock. reading in vm_swap_full() doesn't need lock 减等于al of usable pages of swap |
| 2583 | SWP_USED etc: see above 与等于SWP_WRITEOK的反 |
| 2584 | 自旋锁解锁 |
| 2585 | 自旋锁解锁 |
| 2589 | set_current_oom_origin() |
| 2590 | err等于If the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false |
| 2591 | clear_current_oom_origin() |
| 2593 | 如果err则 |
| 2602 | 加自旋锁 |
| 2603 | 加自旋锁 |
| 2604 | SWP_USED etc: see above 与等于SWP_VALID的反 |
| 2605 | 自旋锁解锁 |
| 2606 | 自旋锁解锁 |
| 2616 | 如果SWP_USED etc: see above 按位与SWP_CONTINUED则_swap_count_continuations - swapoff free all the continuation pages* appended to the swap_map, after swap_map is quiesced, before vfree'ing it. |
| 2619 | 如果非swap device or bdev of swap file 或非blk_queue_nonrot(bdev_get_queue(swap device or bdev of swap file ))则atomic_dec( & nr_rotate_swap) |
| 2622 | mutex_lock( & swapon_mutex) |
| 2623 | 加自旋锁 |
| 2624 | 加自旋锁 |
| 2628 | dex of last free in swap_map 等于0 |
| 2629 | 当SWP_USED etc: see above 大于等于SWP_SCANNING循环 |
| 2637 | swap_file等于seldom referenced |
| 2639 | seldom referenced = NULL |
| 2640 | xtent of the swap_map 等于0 |
| 2642 | vmalloc'ed array of usage counts = NULL |
| 2644 | cluster info. Only for SSD = NULL |
| 2645 | frontswap_map等于frontswap_map_get(p) |
| 2646 | 自旋锁解锁 |
| 2647 | 自旋锁解锁 |
| 2649 | frontswap_map_set(p, NULL) |
| 2651 | 释放内存 |
| 2652 | per cpu's swap location = NULL |
| 2664 | set_blocksize(bdev, old_block_size) |
| 2668 | inode_lock(inode) |
| 2669 | i_flags与等于Do not truncate: swapon got its bmaps 的反 |
| 2670 | inode_unlock(inode) |
| 2671 | filp_close(swap_file, NULL) |
| 2678 | 加自旋锁 |
| 2679 | SWP_USED etc: see above 等于0 |
| 2680 | 自旋锁解锁 |
| 2682 | err等于0 |
| 2684 | wake_up_interruptible( & proc_poll_wait) |
| 2686 | out_dput : |
| 2687 | filp_close(victim, NULL) |
| 2688 | out : |
| 2690 | 返回:err |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |