From: Andrew Morton <[email-masked]>

Cc: Dipankar Sarma <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 arch/ia64/kernel/perfmon.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -puN arch/ia64/kernel/perfmon.c~files-break-up-files-struct-ia64-fix arch/ia64/kernel/perfmon.c
--- 25/arch/ia64/kernel/perfmon.c~files-break-up-files-struct-ia64-fix	2005-06-19 22:13:55.000000000 -0700
+++ 25-akpm/arch/ia64/kernel/perfmon.c	2005-06-19 22:23:06.000000000 -0700
@@ -39,6 +39,7 @@
 #include <linux/mount.h>
 #include <linux/version.h>
 #include <linux/bitops.h>
+#include <linux/rcupdate.h>
 
 #include <asm/errno.h>
 #include <asm/intrinsics.h>
@@ -2218,15 +2219,17 @@ static void
 pfm_free_fd(int fd, struct file *file)
 {
 	struct files_struct *files = current->files;
+	struct fdtable *fdt = files_fdtable(files);
 
 	/* 
 	 * there ie no fd_uninstall(), so we do it here
 	 */
 	spin_lock(&files->file_lock);
-        files->fd[fd] = NULL;
+	rcu_assign_pointer(fdt->fd[fd], NULL);
 	spin_unlock(&files->file_lock);
 
-	if (file) put_filp(file);
+	if (file)
+		put_filp(file);
 	put_unused_fd(fd);
 }
 
_