ath5k: fix NULL pointer in antenna configuration
[safe/jmp/linux-2.6] / fs / file.c
index 87e1290..34bb7f7 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -257,7 +257,7 @@ int expand_files(struct files_struct *files, int nr)
         * N.B. For clone tasks sharing a files structure, this test
         * will limit the total number of files that can be opened.
         */
-       if (nr >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
+       if (nr >= rlimit(RLIMIT_NOFILE))
                return -EMFILE;
 
        /* Do we need to expand? */
@@ -478,7 +478,7 @@ repeat:
        error = fd;
 #if 1
        /* Sanity check */
-       if (rcu_dereference(fdt->fd[fd]) != NULL) {
+       if (rcu_dereference_raw(fdt->fd[fd]) != NULL) {
                printk(KERN_WARNING "alloc_fd: slot %d not NULL!\n", fd);
                rcu_assign_pointer(fdt->fd[fd], NULL);
        }