Rev 3637 | Rev 3656 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3637 | Rev 3652 | ||
---|---|---|---|
Line 180... | Line 180... | ||
180 | spc = bs->spc; |
180 | spc = bs->spc; |
181 | 181 | ||
182 | boundary = ROUND_UP(nodep->size, bps * spc); |
182 | boundary = ROUND_UP(nodep->size, bps * spc); |
183 | 183 | ||
184 | /* zero out already allocated space */ |
184 | /* zero out already allocated space */ |
185 | for (o = nodep->size - 1; o < pos && o < boundary; |
185 | for (o = nodep->size; o < pos && o < boundary; |
186 | o = ALIGN_DOWN(o + bps, bps)) { |
186 | o = ALIGN_DOWN(o + bps, bps)) { |
187 | int flags = (o % bps == 0) ? |
187 | int flags = (o % bps == 0) ? |
188 | BLOCK_FLAGS_NOREAD : BLOCK_FLAGS_NONE; |
188 | BLOCK_FLAGS_NOREAD : BLOCK_FLAGS_NONE; |
189 | b = fat_block_get(bs, nodep, o / bps, flags); |
189 | b = fat_block_get(bs, nodep, o / bps, flags); |
190 | memset(b->data + o % bps, 0, bps - o % bps); |
190 | memset(b->data + o % bps, 0, bps - o % bps); |