Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 15:46:57 +0000 (08:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 15:46:57 +0000 (08:46 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  get rid of BKL in fs/sysv
  get rid of BKL in fs/minix
  get rid of BKL in fs/efs
  befs ->pust_super() doesn't need BKL
  Cleanup of adfs headers
  9P doesn't need BKL in ->umount_begin()
  fuse doesn't need BKL in ->umount_begin()
  No instance of ->bmap() needs BKL
  remove unlock_kernel() left accidentally
  ext4: avoid unnecessary spinlock in critical POSIX ACL path
  ext3: avoid unnecessary spinlock in critical POSIX ACL path

1  2 
fs/befs/linuxvfs.c

diff --combined fs/befs/linuxvfs.c
index 89cd2deeb4aff144d1ee4355e6e57b4c9ec3aaeb,02c06138bc6aa3faf954ef2f6083c9e6aea503db..615d5496fe0f929509cca53a5cbbb2ea4aa745b0
@@@ -513,7 -513,7 +513,7 @@@ befs_utf2nls(struct super_block *sb, co
  {
        struct nls_table *nls = BEFS_SB(sb)->nls;
        int i, o;
 -      wchar_t uni;
 +      unicode_t uni;
        int unilen, utflen;
        char *result;
        /* The utf8->nls conversion won't make the final nls string bigger
        for (i = o = 0; i < in_len; i += utflen, o += unilen) {
  
                /* convert from UTF-8 to Unicode */
 -              utflen = utf8_mbtowc(&uni, &in[i], in_len - i);
 -              if (utflen < 0) {
 +              utflen = utf8_to_utf32(&in[i], in_len - i, &uni);
 +              if (utflen < 0)
                        goto conv_err;
 -              }
  
                /* convert from Unicode to nls */
 +              if (uni > MAX_WCHAR_T)
 +                      goto conv_err;
                unilen = nls->uni2char(uni, &result[o], in_len - o);
 -              if (unilen < 0) {
 +              if (unilen < 0)
                        goto conv_err;
 -              }
        }
        result[o] = '\0';
        *out_len = o;
@@@ -619,13 -619,15 +619,13 @@@ befs_nls2utf(struct super_block *sb, co
  
                /* convert from nls to unicode */
                unilen = nls->char2uni(&in[i], in_len - i, &uni);
 -              if (unilen < 0) {
 +              if (unilen < 0)
                        goto conv_err;
 -              }
  
                /* convert from unicode to UTF-8 */
 -              utflen = utf8_wctomb(&result[o], uni, 3);
 -              if (utflen <= 0) {
 +              utflen = utf32_to_utf8(uni, &result[o], 3);
 +              if (utflen <= 0)
                        goto conv_err;
 -              }
        }
  
        result[o] = '\0';
@@@ -735,8 -737,6 +735,6 @@@ parse_options(char *options, befs_mount
  static void
  befs_put_super(struct super_block *sb)
  {
-       lock_kernel();
        kfree(BEFS_SB(sb)->mount_opts.iocharset);
        BEFS_SB(sb)->mount_opts.iocharset = NULL;
  
  
        kfree(sb->s_fs_info);
        sb->s_fs_info = NULL;
-       unlock_kernel();
  }
  
  /* Allocate private field of the superblock, fill it.