]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ufs/super.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6-omap-h63xx.git] / fs / ufs / super.c
index 19a99726e58dd7fbaf00f2bb17bbe3a8764503fe..ec79e3091d1bc7f647905edc7c410c94dcb10a3a 100644 (file)
@@ -611,11 +611,10 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
        
        UFSD("ENTER\n");
                
-       sbi = kmalloc(sizeof(struct ufs_sb_info), GFP_KERNEL);
+       sbi = kzalloc(sizeof(struct ufs_sb_info), GFP_KERNEL);
        if (!sbi)
                goto failed_nomem;
        sb->s_fs_info = sbi;
-       memset(sbi, 0, sizeof(struct ufs_sb_info));
 
        UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY));
        
@@ -1245,8 +1244,7 @@ static int init_inodecache(void)
 
 static void destroy_inodecache(void)
 {
-       if (kmem_cache_destroy(ufs_inode_cachep))
-               printk(KERN_INFO "ufs_inode_cache: not all structures were freed\n");
+       kmem_cache_destroy(ufs_inode_cachep);
 }
 
 #ifdef CONFIG_QUOTA
@@ -1326,7 +1324,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type,
        size_t towrite = len;
        struct buffer_head *bh;
 
-       mutex_lock(&inode->i_mutex);
+       mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
        while (towrite > 0) {
                tocopy = sb->s_blocksize - offset < towrite ?
                                sb->s_blocksize - offset : towrite;