From 6627d919dee4ea9d2a242dd7a61ce090373f4f76 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 11 Apr 2017 08:29:12 +0000 Subject: [PATCH] Remove debugging printf. Instead, issue a diagnostic and return appropriate error if ncl_flush() was unable to clean buffer queue after the specified number or retries. Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clvnops.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 30227ff82a50..8ba3bdfd911e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2971,14 +2971,17 @@ done: free(bvec, M_TEMP); if (error == 0 && commit != 0 && waitfor == MNT_WAIT && (bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0 || - np->n_directio_asyncwr != 0) && trycnt++ < 5) { - /* try, try again... */ - passone = 1; - wcred = NULL; - bvec = NULL; - bvecsize = 0; -printf("try%d\n", trycnt); - goto again; + np->n_directio_asyncwr != 0)) { + if (trycnt++ < 5) { + /* try, try again... */ + passone = 1; + wcred = NULL; + bvec = NULL; + bvecsize = 0; + goto again; + } + vn_printf(vp, "ncl_flush failed"); + error = called_from_renewthread != 0 ? EIO : EBUSY; } return (error); }