patch-2.3.10 linux/drivers/sgi/char/usema.c

Next file: linux/drivers/sound/cmpci.c
Previous file: linux/drivers/sgi/char/shmiq.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.9/linux/drivers/sgi/char/usema.c linux/drivers/sgi/char/usema.c
@@ -53,8 +53,8 @@
 	if (newfd < 0)
 		return newfd;
 	
-	current->files->fd [newfd] = usema->filp;
-	atomic_inc(&usema->filp->f_count);
+	get_file(usema->filp);
+	fd_install(newfd, usema->filp);
 	/* Is that it? */
 	printk("UIOCATTACHSEMA: new usema fd is %d", newfd);
 	return newfd;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)