diff options
Diffstat (limited to 'fs/fat/namei_vfat.c')
-rw-r--r-- | fs/fat/namei_vfat.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index a0e00e3a46e9..cb6e83557112 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
20 | #include <linux/ctype.h> | 20 | #include <linux/ctype.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/smp_lock.h> | ||
23 | #include <linux/buffer_head.h> | 22 | #include <linux/buffer_head.h> |
24 | #include <linux/namei.h> | 23 | #include <linux/namei.h> |
25 | #include "fat.h" | 24 | #include "fat.h" |
@@ -502,11 +501,11 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname, | |||
502 | if (utf8) { | 501 | if (utf8) { |
503 | int name_len = strlen(name); | 502 | int name_len = strlen(name); |
504 | 503 | ||
505 | *outlen = utf8_mbstowcs((wchar_t *)outname, name, PATH_MAX); | 504 | *outlen = utf8s_to_utf16s(name, PATH_MAX, (wchar_t *) outname); |
506 | 505 | ||
507 | /* | 506 | /* |
508 | * We stripped '.'s before and set len appropriately, | 507 | * We stripped '.'s before and set len appropriately, |
509 | * but utf8_mbstowcs doesn't care about len | 508 | * but utf8s_to_utf16s doesn't care about len |
510 | */ | 509 | */ |
511 | *outlen -= (name_len - len); | 510 | *outlen -= (name_len - len); |
512 | 511 | ||
@@ -965,7 +964,7 @@ static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
965 | int start = MSDOS_I(new_dir)->i_logstart; | 964 | int start = MSDOS_I(new_dir)->i_logstart; |
966 | dotdot_de->start = cpu_to_le16(start); | 965 | dotdot_de->start = cpu_to_le16(start); |
967 | dotdot_de->starthi = cpu_to_le16(start >> 16); | 966 | dotdot_de->starthi = cpu_to_le16(start >> 16); |
968 | mark_buffer_dirty(dotdot_bh); | 967 | mark_buffer_dirty_inode(dotdot_bh, old_inode); |
969 | if (IS_DIRSYNC(new_dir)) { | 968 | if (IS_DIRSYNC(new_dir)) { |
970 | err = sync_dirty_buffer(dotdot_bh); | 969 | err = sync_dirty_buffer(dotdot_bh); |
971 | if (err) | 970 | if (err) |
@@ -1009,7 +1008,7 @@ error_dotdot: | |||
1009 | int start = MSDOS_I(old_dir)->i_logstart; | 1008 | int start = MSDOS_I(old_dir)->i_logstart; |
1010 | dotdot_de->start = cpu_to_le16(start); | 1009 | dotdot_de->start = cpu_to_le16(start); |
1011 | dotdot_de->starthi = cpu_to_le16(start >> 16); | 1010 | dotdot_de->starthi = cpu_to_le16(start >> 16); |
1012 | mark_buffer_dirty(dotdot_bh); | 1011 | mark_buffer_dirty_inode(dotdot_bh, old_inode); |
1013 | corrupt |= sync_dirty_buffer(dotdot_bh); | 1012 | corrupt |= sync_dirty_buffer(dotdot_bh); |
1014 | } | 1013 | } |
1015 | error_inode: | 1014 | error_inode: |
@@ -1030,7 +1029,7 @@ error_inode: | |||
1030 | sinfo.bh = NULL; | 1029 | sinfo.bh = NULL; |
1031 | } | 1030 | } |
1032 | if (corrupt < 0) { | 1031 | if (corrupt < 0) { |
1033 | fat_fs_panic(new_dir->i_sb, | 1032 | fat_fs_error(new_dir->i_sb, |
1034 | "%s: Filesystem corrupted (i_pos %lld)", | 1033 | "%s: Filesystem corrupted (i_pos %lld)", |
1035 | __func__, sinfo.i_pos); | 1034 | __func__, sinfo.i_pos); |
1036 | } | 1035 | } |