svn commit: r239848 - stable/9/sys/fs/nfsclient
Konstantin Belousov
kib at FreeBSD.org
Wed Aug 29 15:53:28 UTC 2012
Author: kib
Date: Wed Aug 29 15:53:27 2012
New Revision: 239848
URL: http://svn.freebsd.org/changeset/base/239848
Log:
MFC r237987:
Do not override an error from uiomove() with (non-)error result from
bwrite().
Modified:
stable/9/sys/fs/nfsclient/nfs_clbio.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/fs/ (props changed)
Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clbio.c Wed Aug 29 15:51:40 2012 (r239847)
+++ stable/9/sys/fs/nfsclient/nfs_clbio.c Wed Aug 29 15:53:27 2012 (r239848)
@@ -873,7 +873,7 @@ ncl_write(struct vop_write_args *ap)
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
daddr_t lbn;
int bcount;
- int bp_cached, n, on, error = 0;
+ int bp_cached, n, on, error = 0, error1;
size_t orig_resid, local_resid;
off_t orig_size, tmp_off;
@@ -1235,9 +1235,12 @@ again:
if ((ioflag & IO_SYNC)) {
if (ioflag & IO_INVAL)
bp->b_flags |= B_NOCACHE;
- error = bwrite(bp);
- if (error)
+ error1 = bwrite(bp);
+ if (error1 != 0) {
+ if (error == 0)
+ error = error1;
break;
+ }
} else if ((n + on) == biosize) {
bp->b_flags |= B_ASYNC;
(void) ncl_writebp(bp, 0, NULL);
More information about the svn-src-stable-9
mailing list