+15
−19
Loading
next inclusion category: performance bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB1S01 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=52732bb9abc9ee5b82ed62edef51be4a255fc78a -------------------------------- alloc_fd() has a sanity check inside to make sure the struct file mapping to the allocated fd is NULL. Remove this sanity check since it can be assured by exisitng zero initialization and NULL set when recycling fd. Meanwhile, add likely/unlikely and expand_file() call avoidance to reduce the work under file_lock. Reviewed-by:Jan Kara <jack@suse.cz> Reviewed-by:
Tim Chen <tim.c.chen@linux.intel.com> Signed-off-by:
Yu Ma <yu.ma@intel.com> Link: https://lore.kernel.org/r/20240717145018.3972922-2-yu.ma@intel.com Signed-off-by:
Christian Brauner <brauner@kernel.org> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Conflicts: fs/file.c [Context conflict] Signed-off-by:
Jinjie Ruan <ruanjinjie@huawei.com>