Fix two bugs in cluster_read:
authorSimon Schubert <corecode@dragonflybsd.org>
Fri, 14 Jul 2006 19:23:39 +0000 (19:23 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Fri, 14 Jul 2006 19:23:39 +0000 (19:23 +0000)
commitbfda7080c8aa9b419400100aa75b789d14ee921e
treee9a153d3801d929033496a43f7eae77dc3abd60e
parentfe80ae4a02e69e48dee3b2355b3a5e86da48384a
Fix two bugs in cluster_read:
- brelse rbp with B_INVAL set in case of a VOP_BMAP() error

- move the read-ahead after starting the real read for bp, so that it
  can be skipped if an error occured in the reading of bp.

  Before this commit rbp might have been a CLUSTER and didn't get special
  treatment for freeing, which resulted in a panic.

Reported-by: swildner
sys/kern/vfs_cluster.c