file.c (0ea8a56de21be24cb79abb03dee79aabcd60a316) | file.c (0f2122045b946241a9e549c2a76cea54fa58a7ff) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/file.c 4 * 5 * Copyright (C) 1998-1999, Stephen Tweedie and Bill Hawes 6 * 7 * Manage the dynamic fd arrays in the process files_struct. 8 */ --- 7 unchanged lines hidden (view full) --- 16#include <linux/slab.h> 17#include <linux/file.h> 18#include <linux/fdtable.h> 19#include <linux/bitops.h> 20#include <linux/spinlock.h> 21#include <linux/rcupdate.h> 22#include <linux/close_range.h> 23#include <net/sock.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/file.c 4 * 5 * Copyright (C) 1998-1999, Stephen Tweedie and Bill Hawes 6 * 7 * Manage the dynamic fd arrays in the process files_struct. 8 */ --- 7 unchanged lines hidden (view full) --- 16#include <linux/slab.h> 17#include <linux/file.h> 18#include <linux/fdtable.h> 19#include <linux/bitops.h> 20#include <linux/spinlock.h> 21#include <linux/rcupdate.h> 22#include <linux/close_range.h> 23#include <net/sock.h> |
24#include <linux/io_uring.h> |
|
24 25unsigned int sysctl_nr_open __read_mostly = 1024*1024; 26unsigned int sysctl_nr_open_min = BITS_PER_LONG; 27/* our min() is unusable in constant expressions ;-/ */ 28#define __const_min(x, y) ((x) < (y) ? (x) : (y)) 29unsigned int sysctl_nr_open_max = 30 __const_min(INT_MAX, ~(size_t)0/sizeof(void *)) & -BITS_PER_LONG; 31 --- 415 unchanged lines hidden (view full) --- 447 put_files_struct(old); 448} 449 450void exit_files(struct task_struct *tsk) 451{ 452 struct files_struct * files = tsk->files; 453 454 if (files) { | 25 26unsigned int sysctl_nr_open __read_mostly = 1024*1024; 27unsigned int sysctl_nr_open_min = BITS_PER_LONG; 28/* our min() is unusable in constant expressions ;-/ */ 29#define __const_min(x, y) ((x) < (y) ? (x) : (y)) 30unsigned int sysctl_nr_open_max = 31 __const_min(INT_MAX, ~(size_t)0/sizeof(void *)) & -BITS_PER_LONG; 32 --- 415 unchanged lines hidden (view full) --- 448 put_files_struct(old); 449} 450 451void exit_files(struct task_struct *tsk) 452{ 453 struct files_struct * files = tsk->files; 454 455 if (files) { |
456 io_uring_files_cancel(files); |
|
455 task_lock(tsk); 456 tsk->files = NULL; 457 task_unlock(tsk); 458 put_files_struct(files); 459 } 460} 461 462struct files_struct init_files = { --- 735 unchanged lines hidden --- | 457 task_lock(tsk); 458 tsk->files = NULL; 459 task_unlock(tsk); 460 put_files_struct(files); 461 } 462} 463 464struct files_struct init_files = { --- 735 unchanged lines hidden --- |