fat: fix incorrect function comment
authorRavishankar N <cyberax82@gmail.com>
Thu, 20 Dec 2012 23:05:46 +0000 (15:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Dec 2012 01:40:20 +0000 (17:40 -0800)
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>
fs/fat/dir.c
fs/fat/inode.c
fs/fat/misc.c

index 2a182342442edc772bdfafc11eb55d6639db6805..58bf744dbf392b51d05fedf979118cddd5b50663 100644 (file)
@@ -461,8 +461,7 @@ static int fat_parse_short(struct super_block *sb,
 }
 
 /*
- * Return values: negative -> error, 0 -> not found, positive -> found,
- * value is the total amount of slots, including the shortname entry.
+ * Return values: negative -> error/not found, 0 -> found.
  */
 int fat_search_long(struct inode *inode, const unsigned char *name,
                    int name_len, struct fat_slot_info *sinfo)
@@ -1255,7 +1254,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
 
        sinfo->nr_slots = nr_slots;
 
-       /* First stage: search free direcotry entries */
+       /* First stage: search free directory entries */
        free_slots = nr_bhs = 0;
        bh = prev = NULL;
        pos = 0;
index 35806813ea4ee3bb425795c52c0719f64979203a..f8f491677a4ac6cbce51a3acb3e6d78e54235cc1 100644 (file)
@@ -1344,7 +1344,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
        sbi->dir_entries = get_unaligned_le16(&b->dir_entries);
        if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
                if (!silent)
-                       fat_msg(sb, KERN_ERR, "bogus directroy-entries per block"
+                       fat_msg(sb, KERN_ERR, "bogus directory-entries per block"
                               " (%u)", sbi->dir_entries);
                brelse(bh);
                goto out_invalid;
index 5eb600dc43a9064257a2485dde54f8a0ce332972..359d307b5507a5efd72f41c78434f5f9d35b2558 100644 (file)
@@ -135,6 +135,10 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster)
                }
                if (ret < 0)
                        return ret;
+               /*
+                * FIXME:Although we can add this cache, fat_cache_add() is
+                * assuming to be called after linear search with fat_cache_id.
+                */
 //             fat_cache_add(inode, new_fclus, new_dclus);
        } else {
                MSDOS_I(inode)->i_start = new_dclus;