* [PATCH RESEND 1/1] fat:fix incorrect function comment
@ 2012-12-20 16:11 Ravishankar N
2012-12-20 17:31 ` OGAWA Hirofumi
0 siblings, 1 reply; 2+ messages in thread
From: Ravishankar N @ 2012-12-20 16:11 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Andrew Morton, LKML, Ravishankar N, Namjae Jeon
fat_search_long() returns 0 on success, -ENOENT/ENOMEM on failure.Change
the function comment accordingly.
While at it, fix some trivial typos.
v2 changes:add a FIXME note according to review comment.
modified: fs/fat/dir.c
modified: fs/fat/inode.c
modified: fs/fat/misc.c
Signed-off-by: Ravishankar N <cyberax82@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
fs/fat/dir.c | 5 ++---
fs/fat/inode.c | 2 +-
fs/fat/misc.c | 4 ++++
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 2a18234..58bf744 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -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;
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 3580681..f8f4916 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,
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;
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index 5eb600d..359d307 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)
}
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;
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH RESEND 1/1] fat:fix incorrect function comment
2012-12-20 16:11 [PATCH RESEND 1/1] fat:fix incorrect function comment Ravishankar N
@ 2012-12-20 17:31 ` OGAWA Hirofumi
0 siblings, 0 replies; 2+ messages in thread
From: OGAWA Hirofumi @ 2012-12-20 17:31 UTC (permalink / raw)
To: Ravishankar N; +Cc: Andrew Morton, LKML, Namjae Jeon
Ravishankar N <cyberax82@gmail.com> writes:
> fat_search_long() returns 0 on success, -ENOENT/ENOMEM on failure.Change
> the function comment accordingly.
>
> While at it, fix some trivial typos.
Looks good. Thanks.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> v2 changes:add a FIXME note according to review comment.
> modified: fs/fat/dir.c
> modified: fs/fat/inode.c
> modified: fs/fat/misc.c
>
> Signed-off-by: Ravishankar N <cyberax82@gmail.com>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> ---
> fs/fat/dir.c | 5 ++---
> fs/fat/inode.c | 2 +-
> fs/fat/misc.c | 4 ++++
> 3 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index 2a18234..58bf744 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -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;
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 3580681..f8f4916 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,
> 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;
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index 5eb600d..359d307 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)
> }
> 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;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-20 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 16:11 [PATCH RESEND 1/1] fat:fix incorrect function comment Ravishankar N
2012-12-20 17:31 ` OGAWA Hirofumi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.