From: Jaegeuk Kim Date: Mon, 21 Jan 2013 08:34:21 +0000 (+0900) Subject: f2fs: add comments of start_bidx_of_node X-Git-Tag: v3.8~94^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9af45ef5ab8ce4a13c553200dc15509441fbd68f;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 809cfec..c386910 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -424,7 +424,11 @@ next_step: } /* - * 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) {