Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
[GFS2] fix gfs2 block allocation (cleaned up)
[GFS2] BUG: unable to handle kernel paging request at ffff81002690e000

+10 -15
+9 -14
fs/gfs2/bmap.c
··· 246 246 247 247 } 248 248 249 - static inline unsigned int zero_metapath_length(const struct metapath *mp, 250 - unsigned height) 249 + static inline unsigned int metapath_branch_start(const struct metapath *mp) 251 250 { 252 - unsigned int i; 253 - for (i = 0; i < height - 1; i++) { 254 - if (mp->mp_list[i] != 0) 255 - return i; 256 - } 257 - return height; 251 + if (mp->mp_list[0] == 0) 252 + return 2; 253 + return 1; 258 254 } 259 255 260 256 /** ··· 432 436 struct gfs2_sbd *sdp = GFS2_SB(inode); 433 437 struct buffer_head *dibh = mp->mp_bh[0]; 434 438 u64 bn, dblock = 0; 435 - unsigned n, i, blks, alloced = 0, iblks = 0, zmpl = 0; 439 + unsigned n, i, blks, alloced = 0, iblks = 0, branch_start = 0; 436 440 unsigned dblks = 0; 437 441 unsigned ptrs_per_blk; 438 442 const unsigned end_of_metadata = height - 1; ··· 467 471 /* Building up tree height */ 468 472 state = ALLOC_GROW_HEIGHT; 469 473 iblks = height - ip->i_height; 470 - zmpl = zero_metapath_length(mp, height); 471 - iblks -= zmpl; 472 - iblks += height; 474 + branch_start = metapath_branch_start(mp); 475 + iblks += (height - branch_start); 473 476 } 474 477 } 475 478 ··· 504 509 sizeof(struct gfs2_meta_header)); 505 510 *ptr = zero_bn; 506 511 state = ALLOC_GROW_DEPTH; 507 - for(i = zmpl; i < height; i++) { 512 + for(i = branch_start; i < height; i++) { 508 513 if (mp->mp_bh[i] == NULL) 509 514 break; 510 515 brelse(mp->mp_bh[i]); 511 516 mp->mp_bh[i] = NULL; 512 517 } 513 - i = zmpl; 518 + i = branch_start; 514 519 } 515 520 if (n == 0) 516 521 break;
+1 -1
fs/gfs2/rgrp.c
··· 195 195 depending on architecture. I've experimented with several ways 196 196 of writing this section such as using an else before the goto 197 197 but this one seems to be the fastest. */ 198 - while ((unsigned char *)plong < end - 1) { 198 + while ((unsigned char *)plong < end - sizeof(unsigned long)) { 199 199 prefetch(plong + 1); 200 200 if (((*plong) & LBITMASK) != lskipval) 201 201 break;