X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Ffile.c;h=8df13b0a310a2a5e270eb94ce51dca2290e73147;hb=a4cb4b1277a499ebced7f7534d5cfb11a30eb224;hp=4c6992d8f3ba1e3056645e805ddcb4c879d82f93;hpb=ea0ca3a843babd50c22dfbb5cf2d9a14df821b2b;p=pandora-kernel.git diff --git a/fs/file.c b/fs/file.c index 4c6992d8f3ba..8df13b0a310a 100644 --- a/fs/file.c +++ b/fs/file.c @@ -47,7 +47,7 @@ static void *alloc_fdmem(unsigned int size) * vmalloc() if the allocation size will be considered "large" by the VM. */ if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { - void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN); + void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY); if (data != NULL) return data; } @@ -268,6 +268,7 @@ int expand_files(struct files_struct *files, int nr) /* All good, so we try */ return expand_fdtable(files, nr); } +EXPORT_SYMBOL_GPL(expand_files); static int count_open_files(struct fdtable *fdt) { @@ -366,7 +367,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 +461,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 */