diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-21 03:34:21 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-21 20:48:59 -0500 |
commit | 9af45ef5ab8ce4a13c553200dc15509441fbd68f (patch) | |
tree | 7a1d76bb6d1d87ab0a3eace1311446666ec01c18 /fs/f2fs | |
parent | a7fdffbd3ea4b3cc2993af006bde38a423b38b72 (diff) |
f2fs: add comments of start_bidx_of_node
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 <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/gc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 809cfec6683c..c386910dacc5 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -424,7 +424,11 @@ next_step: | |||
424 | } | 424 | } |
425 | 425 | ||
426 | /* | 426 | /* |
427 | * Calculate start block index that this node page contains | 427 | * Calculate start block index indicating the given node offset. |
428 | * Be careful, caller should give this node offset only indicating direct node | ||
429 | * blocks. If any node offsets, which point the other types of node blocks such | ||
430 | * as indirect or double indirect node blocks, are given, it must be a caller's | ||
431 | * bug. | ||
428 | */ | 432 | */ |
429 | block_t start_bidx_of_node(unsigned int node_ofs) | 433 | block_t start_bidx_of_node(unsigned int node_ofs) |
430 | { | 434 | { |