OSDN Git Service

fs/affs: define AFFSNAMEMAX to replace constant use
[android-x86/kernel.git] / fs / affs / super.c
index f754ab6..c3524bf 100644 (file)
@@ -584,7 +584,7 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
        buf->f_bavail  = free;
        buf->f_fsid.val[0] = (u32)id;
        buf->f_fsid.val[1] = (u32)(id >> 32);
-       buf->f_namelen = 30;
+       buf->f_namelen = AFFSNAMEMAX;
        return 0;
 }
 
@@ -602,6 +602,7 @@ static void affs_kill_sb(struct super_block *sb)
                affs_free_bitmap(sb);
                affs_brelse(sbi->s_root_bh);
                kfree(sbi->s_prefix);
+               mutex_destroy(&sbi->s_bmlock);
                kfree(sbi);
        }
 }