X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Ffile.c;h=dab120b71e44d9faeedf56371793067ab92984e6;hb=eda809aef53426d044b519405d25d9da55319b76;hp=8434e0afecc7328a2b53ad2c110f9c80db428150;hpb=5ba836eb9fdb07843cfa004e511f333745adb76e;p=linux-2.6-microblaze.git diff --git a/fs/file.c b/fs/file.c index 8434e0afecc7..dab120b71e44 100644 --- a/fs/file.c +++ b/fs/file.c @@ -21,7 +21,6 @@ #include #include #include -#include unsigned int sysctl_nr_open __read_mostly = 1024*1024; unsigned int sysctl_nr_open_min = BITS_PER_LONG; @@ -428,7 +427,6 @@ void exit_files(struct task_struct *tsk) struct files_struct * files = tsk->files; if (files) { - io_uring_files_cancel(files); task_lock(tsk); tsk->files = NULL; task_unlock(tsk); @@ -694,8 +692,10 @@ int __close_range(unsigned fd, unsigned max_fd, unsigned int flags) * If the requested range is greater than the current maximum, * we're closing everything so only copy all file descriptors * beneath the lowest file descriptor. + * If the caller requested all fds to be made cloexec copy all + * of the file descriptors since they still want to use them. */ - if (max_fd >= cur_max) + if (!(flags & CLOSE_RANGE_CLOEXEC) && (max_fd >= cur_max)) max_unshare_fds = fd; ret = unshare_fd(CLONE_FILES, max_unshare_fds, &fds);