> + error = xfs_btree_count_blocks(cur, &btblocks); > + xfs_btree_del_cursor(cur, error); > + if (error) > + return error; > + > + *count += btblocks - 1; Can you throw in a comment explaining the -1 here? Without doing extra research I can't think of a reason why it would be there. > + /* fall through */ > + case XFS_DINODE_FMT_EXTENTS: > + *nextents = xfs_bmap_count_leaves(ifp, count); > return 0; I don't think you need the return statement here as there is a return 0 just below it.