]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/staging/android/binder.c
Merge branch 'x86/x32' into x86/cleanups
[mirror_ubuntu-kernels.git] / drivers / staging / android / binder.c
index f0b7e6605ab5e4969d88a2112498439362454f82..eeaa9b8b8c3880d93f6fddfc4441350a12844d61 100644 (file)
@@ -380,8 +380,7 @@ int task_get_unused_fd_flags(struct binder_proc *proc, int flags)
 
 repeat:
        fdt = files_fdtable(files);
-       fd = find_next_zero_bit(fdt->open_fds->fds_bits, fdt->max_fds,
-                               files->next_fd);
+       fd = find_next_zero_bit(fdt->open_fds, fdt->max_fds, files->next_fd);
 
        /*
         * N.B. For clone tasks sharing a files structure, this test
@@ -409,11 +408,11 @@ repeat:
                goto repeat;
        }
 
-       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);
        files->next_fd = fd + 1;
 #if 1
        /* Sanity check */
@@ -454,7 +453,7 @@ static void task_fd_install(
 static void __put_unused_fd(struct files_struct *files, unsigned int fd)
 {
        struct fdtable *fdt = files_fdtable(files);
-       __FD_CLR(fd, fdt->open_fds);
+       __clear_open_fd(fd, fdt);
        if (fd < files->next_fd)
                files->next_fd = fd;
 }
@@ -480,7 +479,7 @@ static long task_close_fd(struct binder_proc *proc, unsigned int fd)
        if (!filp)
                goto out_unlock;
        rcu_assign_pointer(fdt->fd[fd], NULL);
-       FD_CLR(fd, fdt->close_on_exec);
+       __clear_close_on_exec(fd, fdt);
        __put_unused_fd(files, fd);
        spin_unlock(&files->file_lock);
        retval = filp_close(filp, files);