NFS server: Record bwrite() error in nfsrv_commit.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Sat, 24 Dec 2011 19:27:12 +0000 (11:27 -0800)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Sat, 24 Dec 2011 19:27:12 +0000 (11:27 -0800)
sys/vfs/nfs/nfs_serv.c

index f6cd529..feaa0fc 100644 (file)
@@ -3608,7 +3608,7 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
                }
 
                crit_enter();
-               while (cnt > 0) {
+               while (error == 0 || cnt > 0) {
                        struct buf *bp;
 
                        /*
@@ -3629,7 +3629,7 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
                        if (bp) {
                                if (bp->b_flags & B_DELWRI) {
                                        bremfree(bp);
-                                       bwrite(bp);
+                                       error = bwrite(bp);
                                        ++nfs_commit_miss;
                                } else {
                                        BUF_UNLOCK(bp);