X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=fs%2Ffile.c;h=34bb7f71d99404e8b91a4bfb0654505d1e537318;hb=3be2264be3c00865116f997dc53ebcc90fe7fc4b;hp=f313314f996fcaeb4457c04d64fd8eae25338423;hpb=1027abe8827b47f7e9c4ed6514fde3d44f79963c;p=safe%2Fjmp%2Flinux-2.6 diff --git a/fs/file.c b/fs/file.c index f313314..34bb7f7 100644 --- a/fs/file.c +++ b/fs/file.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -256,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? */ @@ -477,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); }