public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ext2: fix some incorrect comments in inode.c
@ 2020-07-03 12:44 Chengguang Xu
  2020-07-03 12:55 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2020-07-03 12:44 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, Chengguang Xu

There are some incorrect comments in inode.c, so fix them
properly.

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
v1->v2:
- Fix incorrect comment for ext2_blks_to_allocate() instead of
deleting it.
- Fix incorrect comment for ext2_alloc_blocks().

 fs/ext2/inode.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index c8b371c82b4f..80662e1f7889 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -356,8 +356,7 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
  *	@blks: number of data blocks to be mapped.
  *	@blocks_to_boundary:  the offset in the indirect block
  *
- *	return the total number of blocks to be allocate, including the
- *	direct and indirect blocks.
+ *	return the number of direct blocks to allocate.
  */
 static int
 ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks,
@@ -390,11 +389,9 @@ ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks,
  *	ext2_alloc_blocks: multiple allocate blocks needed for a branch
  *	@indirect_blks: the number of blocks need to allocate for indirect
  *			blocks
- *
+ *	@blks: the number of blocks need to allocate for direct blocks
  *	@new_blocks: on return it will store the new block numbers for
  *	the indirect blocks(if needed) and the first direct block,
- *	@blks:	on return it will store the total number of allocated
- *		direct blocks
  */
 static int ext2_alloc_blocks(struct inode *inode,
 			ext2_fsblk_t goal, int indirect_blks, int blks,
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ext2: fix some incorrect comments in inode.c
  2020-07-03 12:44 [PATCH v2] ext2: fix some incorrect comments in inode.c Chengguang Xu
@ 2020-07-03 12:55 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-07-03 12:55 UTC (permalink / raw)
  To: Chengguang Xu; +Cc: jack, linux-ext4

On Fri 03-07-20 20:44:11, Chengguang Xu wrote:
> There are some incorrect comments in inode.c, so fix them
> properly.
> 
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>

Thanks, I've added the patch to my tree.

								Honza

> ---
> v1->v2:
> - Fix incorrect comment for ext2_blks_to_allocate() instead of
> deleting it.
> - Fix incorrect comment for ext2_alloc_blocks().
> 
>  fs/ext2/inode.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
> index c8b371c82b4f..80662e1f7889 100644
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -356,8 +356,7 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
>   *	@blks: number of data blocks to be mapped.
>   *	@blocks_to_boundary:  the offset in the indirect block
>   *
> - *	return the total number of blocks to be allocate, including the
> - *	direct and indirect blocks.
> + *	return the number of direct blocks to allocate.
>   */
>  static int
>  ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks,
> @@ -390,11 +389,9 @@ ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks,
>   *	ext2_alloc_blocks: multiple allocate blocks needed for a branch
>   *	@indirect_blks: the number of blocks need to allocate for indirect
>   *			blocks
> - *
> + *	@blks: the number of blocks need to allocate for direct blocks
>   *	@new_blocks: on return it will store the new block numbers for
>   *	the indirect blocks(if needed) and the first direct block,
> - *	@blks:	on return it will store the total number of allocated
> - *		direct blocks
>   */
>  static int ext2_alloc_blocks(struct inode *inode,
>  			ext2_fsblk_t goal, int indirect_blks, int blks,
> -- 
> 2.20.1
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-03 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-03 12:44 [PATCH v2] ext2: fix some incorrect comments in inode.c Chengguang Xu
2020-07-03 12:55 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox