aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorRavishankar N <cyberax82@gmail.com>2012-12-20 18:05:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 20:40:20 -0500
commitc39540c6d1add1d0ad843b3d2437311924193359 (patch)
tree5ae43f403927e7822897cc423565442fc4bdb360 /fs/fat
parent99bbb2b0d4431e67d11a98f66a6ef8fcd8622649 (diff)
fat: fix incorrect function comment
fat_search_long() returns 0 on success, -ENOENT/ENOMEM on failure. Change the function comment accordingly. While at it, fix some trivial typos. Signed-off-by: Ravishankar N <cyberax82@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/dir.c5
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/fat/misc.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 2a182342442e..58bf744dbf39 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -461,8 +461,7 @@ static int fat_parse_short(struct super_block *sb,
461} 461}
462 462
463/* 463/*
464 * Return values: negative -> error, 0 -> not found, positive -> found, 464 * Return values: negative -> error/not found, 0 -> found.
465 * value is the total amount of slots, including the shortname entry.
466 */ 465 */
467int fat_search_long(struct inode *inode, const unsigned char *name, 466int fat_search_long(struct inode *inode, const unsigned char *name,
468 int name_len, struct fat_slot_info *sinfo) 467 int name_len, struct fat_slot_info *sinfo)
@@ -1255,7 +1254,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
1255 1254
1256 sinfo->nr_slots = nr_slots; 1255 sinfo->nr_slots = nr_slots;
1257 1256
1258 /* First stage: search free direcotry entries */ 1257 /* First stage: search free directory entries */
1259 free_slots = nr_bhs = 0; 1258 free_slots = nr_bhs = 0;
1260 bh = prev = NULL; 1259 bh = prev = NULL;
1261 pos = 0; 1260 pos = 0;
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 35806813ea4e..f8f491677a4a 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1344,7 +1344,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
1344 sbi->dir_entries = get_unaligned_le16(&b->dir_entries); 1344 sbi->dir_entries = get_unaligned_le16(&b->dir_entries);
1345 if (sbi->dir_entries & (sbi->dir_per_block - 1)) { 1345 if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
1346 if (!silent) 1346 if (!silent)
1347 fat_msg(sb, KERN_ERR, "bogus directroy-entries per block" 1347 fat_msg(sb, KERN_ERR, "bogus directory-entries per block"
1348 " (%u)", sbi->dir_entries); 1348 " (%u)", sbi->dir_entries);
1349 brelse(bh); 1349 brelse(bh);
1350 goto out_invalid; 1350 goto out_invalid;
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index 5eb600dc43a9..359d307b5507 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -135,6 +135,10 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster)
135 } 135 }
136 if (ret < 0) 136 if (ret < 0)
137 return ret; 137 return ret;
138 /*
139 * FIXME:Although we can add this cache, fat_cache_add() is
140 * assuming to be called after linear search with fat_cache_id.
141 */
138// fat_cache_add(inode, new_fclus, new_dclus); 142// fat_cache_add(inode, new_fclus, new_dclus);
139 } else { 143 } else {
140 MSDOS_I(inode)->i_start = new_dclus; 144 MSDOS_I(inode)->i_start = new_dclus;