aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/inode.c')
-rw-r--r--fs/ncpfs/inode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 90d2ea28f333..42e3bef270c9 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14 13
15#include <asm/system.h> 14#include <asm/system.h>
@@ -82,8 +81,7 @@ static int init_inodecache(void)
82 81
83static void destroy_inodecache(void) 82static void destroy_inodecache(void)
84{ 83{
85 if (kmem_cache_destroy(ncp_inode_cachep)) 84 kmem_cache_destroy(ncp_inode_cachep);
86 printk(KERN_INFO "ncp_inode_cache: not all structures were freed\n");
87} 85}
88 86
89static int ncp_remount(struct super_block *sb, int *flags, char* data) 87static int ncp_remount(struct super_block *sb, int *flags, char* data)
@@ -105,7 +103,7 @@ static struct super_operations ncp_sops =
105 103
106extern struct dentry_operations ncp_root_dentry_operations; 104extern struct dentry_operations ncp_root_dentry_operations;
107#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) 105#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
108extern struct address_space_operations ncp_symlink_aops; 106extern const struct address_space_operations ncp_symlink_aops;
109extern int ncp_symlink(struct inode*, struct dentry*, const char*); 107extern int ncp_symlink(struct inode*, struct dentry*, const char*);
110#endif 108#endif
111 109
@@ -225,7 +223,6 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)
225 inode->i_nlink = 1; 223 inode->i_nlink = 1;
226 inode->i_uid = server->m.uid; 224 inode->i_uid = server->m.uid;
227 inode->i_gid = server->m.gid; 225 inode->i_gid = server->m.gid;
228 inode->i_blksize = NCP_BLOCK_SIZE;
229 226
230 ncp_update_dates(inode, &nwinfo->i); 227 ncp_update_dates(inode, &nwinfo->i);
231 ncp_update_inode(inode, nwinfo); 228 ncp_update_inode(inode, nwinfo);
@@ -412,11 +409,10 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
412#endif 409#endif
413 struct ncp_entry_info finfo; 410 struct ncp_entry_info finfo;
414 411
415 server = kmalloc(sizeof(struct ncp_server), GFP_KERNEL); 412 server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
416 if (!server) 413 if (!server)
417 return -ENOMEM; 414 return -ENOMEM;
418 sb->s_fs_info = server; 415 sb->s_fs_info = server;
419 memset(server, 0, sizeof(struct ncp_server));
420 416
421 error = -EFAULT; 417 error = -EFAULT;
422 if (raw_data == NULL) 418 if (raw_data == NULL)