Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git] / fs / ufs / super.c
index 74ef5e9..ec79e30 100644 (file)
@@ -64,7 +64,6 @@
  */
 
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/bitops.h>
 
@@ -612,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));
        
@@ -1246,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
@@ -1327,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;