Removed a pile of vfs_unbusy_pages()...both unnecessary and wrong - resulted
in serious system instability. Changed a B_INVAL to a B_NOCACHE so that buffer data is properly disposed of. Submitted by: John Dyson, Rick Macklin, and ohki@gssm.otsuka.tsukuba.ac.jp
This commit is contained in:
parent
b82c50c4e6
commit
ef762baa88
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6148
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
|
||||
* $Id: nfs_bio.c,v 1.8 1995/01/09 16:05:05 davidg Exp $
|
||||
* $Id: nfs_bio.c,v 1.9 1995/01/10 13:06:51 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -249,7 +249,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -267,7 +266,7 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
return (EINTR);
|
||||
got_buf = 1;
|
||||
}
|
||||
bp->b_flags |= B_INVAL;
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
if (bp->b_dirtyend > 0) {
|
||||
if ((bp->b_flags & B_DELWRI) == 0)
|
||||
panic("nfsbioread");
|
||||
@ -293,7 +292,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
bp->b_flags |= B_ERROR;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
@ -315,7 +313,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
bp->b_flags |= B_ERROR;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
@ -337,8 +334,8 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
rabp->b_flags |= (B_READ | B_ASYNC);
|
||||
vfs_busy_pages(rabp, 0);
|
||||
if (nfs_asyncio(rabp, cred)) {
|
||||
vfs_unbusy_pages(rabp);
|
||||
rabp->b_flags |= B_INVAL|B_ERROR;
|
||||
vfs_unbusy_pages(rabp);
|
||||
brelse(rabp);
|
||||
}
|
||||
} else {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
|
||||
* $Id: nfs_bio.c,v 1.8 1995/01/09 16:05:05 davidg Exp $
|
||||
* $Id: nfs_bio.c,v 1.9 1995/01/10 13:06:51 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -249,7 +249,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -267,7 +266,7 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
return (EINTR);
|
||||
got_buf = 1;
|
||||
}
|
||||
bp->b_flags |= B_INVAL;
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
if (bp->b_dirtyend > 0) {
|
||||
if ((bp->b_flags & B_DELWRI) == 0)
|
||||
panic("nfsbioread");
|
||||
@ -293,7 +292,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
bp->b_flags |= B_ERROR;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
@ -315,7 +313,6 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
vfs_busy_pages(bp, 0);
|
||||
error = nfs_doio(bp, cred, p);
|
||||
if (error) {
|
||||
vfs_unbusy_pages(bp);
|
||||
bp->b_flags |= B_ERROR;
|
||||
brelse(bp);
|
||||
return (error);
|
||||
@ -337,8 +334,8 @@ nfs_bioread(vp, uio, ioflag, cred)
|
||||
rabp->b_flags |= (B_READ | B_ASYNC);
|
||||
vfs_busy_pages(rabp, 0);
|
||||
if (nfs_asyncio(rabp, cred)) {
|
||||
vfs_unbusy_pages(rabp);
|
||||
rabp->b_flags |= B_INVAL|B_ERROR;
|
||||
vfs_unbusy_pages(rabp);
|
||||
brelse(rabp);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user