Skip to content

Commit

Permalink
f2fs: add comments of start_bidx_of_node
Browse files Browse the repository at this point in the history
The caller of start_bidx_of_node() should give proper node offsets which
point only direct node blocks. Otherwise, it is a caller's bug.
This patch adds comments to make it clear.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Jaegeuk Kim committed Jan 22, 2013
1 parent a7fdffb commit 9af45ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ static int gc_node_segment(struct f2fs_sb_info *sbi,
}

/*
* Calculate start block index that this node page contains
* Calculate start block index indicating the given node offset.
* Be careful, caller should give this node offset only indicating direct node
* blocks. If any node offsets, which point the other types of node blocks such
* as indirect or double indirect node blocks, are given, it must be a caller's
* bug.
*/
block_t start_bidx_of_node(unsigned int node_ofs)
{
Expand Down

0 comments on commit 9af45ef

Please sign in to comment.