Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/smbfs/smbfs_io.c
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | if (bp->b_iocmd == BIO_READ) { | ||||
* committed to stable storage, the block is still | * committed to stable storage, the block is still | ||||
* dirty and requires either a commit rpc or another | * dirty and requires either a commit rpc or another | ||||
* write rpc with iomode == NFSV3WRITE_FILESYNC before | * write rpc with iomode == NFSV3WRITE_FILESYNC before | ||||
* the block is reused. This is indicated by setting | * the block is reused. This is indicated by setting | ||||
* the B_DELWRI and B_NEEDCOMMIT flags. | * the B_DELWRI and B_NEEDCOMMIT flags. | ||||
*/ | */ | ||||
if (error == EINTR | if (error == EINTR | ||||
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) { | || (!error && (bp->b_flags & B_NEEDCOMMIT))) { | ||||
int s; | |||||
s = splbio(); | |||||
bp->b_flags &= ~(B_INVAL|B_NOCACHE); | bp->b_flags &= ~(B_INVAL|B_NOCACHE); | ||||
if ((bp->b_flags & B_ASYNC) == 0) | if ((bp->b_flags & B_ASYNC) == 0) | ||||
bp->b_flags |= B_EINTR; | bp->b_flags |= B_EINTR; | ||||
if ((bp->b_flags & B_PAGING) == 0) { | if ((bp->b_flags & B_PAGING) == 0) { | ||||
bdirty(bp); | bdirty(bp); | ||||
bp->b_flags &= ~B_DONE; | bp->b_flags &= ~B_DONE; | ||||
} | } | ||||
if ((bp->b_flags & B_ASYNC) == 0) | if ((bp->b_flags & B_ASYNC) == 0) | ||||
bp->b_flags |= B_EINTR; | bp->b_flags |= B_EINTR; | ||||
splx(s); | |||||
} else { | } else { | ||||
if (error) { | if (error) { | ||||
bp->b_ioflags |= BIO_ERROR; | bp->b_ioflags |= BIO_ERROR; | ||||
bp->b_error = error; | bp->b_error = error; | ||||
} | } | ||||
bp->b_dirtyoff = bp->b_dirtyend = 0; | bp->b_dirtyoff = bp->b_dirtyend = 0; | ||||
} | } | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |