patch-2.1.37 linux/fs/ncpfs/inode.c

Next file: linux/fs/nfs/write.c
Previous file: linux/fs/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/fs/ncpfs/inode.c linux/fs/ncpfs/inode.c
@@ -21,6 +21,7 @@
 #include <linux/stat.h>
 #include <linux/errno.h>
 #include <linux/locks.h>
+#include <linux/file.h>
 #include <linux/fcntl.h>
 #include <linux/malloc.h>
 #include <linux/init.h>
@@ -177,7 +178,7 @@
 		printk("ncp_read_super: could not alloc ncp_server\n");
 		return NULL;
 	}
-	ncp_filp->f_count += 1;
+	ncp_filp->f_count++;
 
 	lock_super(sb);
 
@@ -256,7 +257,7 @@
 	ncp_unlock_server(server);
 	ncp_kfree_s(server->packet, server->packet_size);
       fail:
-	ncp_filp->f_count -= 1;
+	put_filp(ncp_filp);
 	ncp_kfree_s(NCP_SBP(sb), sizeof(struct ncp_server));
 	return NULL;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov