]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/file.c
Wrap accesses to the fd_sets in struct fdtable
[mirror_ubuntu-bionic-kernel.git] / fs / file.c
index 4c6992d8f3ba1e3056645e805ddcb4c879d82f93..114fea0a2cec797b84cce227e768eeea00b52972 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -366,7 +366,7 @@ struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
                         * is partway through open().  So make sure that this
                         * fd is available to the new process.
                         */
-                       FD_CLR(open_files - i, new_fdt->open_fds);
+                       __clear_open_fd(open_files - i, new_fdt);
                }
                rcu_assign_pointer(*new_fds++, f);
        }
@@ -460,11 +460,11 @@ repeat:
        if (start <= files->next_fd)
                files->next_fd = fd + 1;
 
-       FD_SET(fd, fdt->open_fds);
+       __set_open_fd(fd, fdt);
        if (flags & O_CLOEXEC)
-               FD_SET(fd, fdt->close_on_exec);
+               __set_close_on_exec(fd, fdt);
        else
-               FD_CLR(fd, fdt->close_on_exec);
+               __clear_close_on_exec(fd, fdt);
        error = fd;
 #if 1
        /* Sanity check */