From cbf46115ea330c1fcb98f81dc9cd89bab642f0d5 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 14 Feb 2012 21:58:09 -0500 Subject: [PATCH] libafs: dont handle outstatus on write error if a write errored, we can't trust the OutStatus we got. don't. Reviewed-on: http://gerrit.openafs.org/6714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 4c8a3cd789a8495d0c0b3f8ff1a7ebb2a20f5336) Change-Id: I69b26330aca2e5fd0d2092b579a0fcf1514acb53 Reviewed-on: http://gerrit.openafs.org/7483 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afs/afs_fetchstore.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index 34736469e..6746f1b4f 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -540,6 +540,7 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist, if (!code) { code = (*ops->close)(rock, OutStatus, doProcessFS); + /* if this succeeds, dv has been bumped. */ if (*doProcessFS) { hadd32(*anewDV, 1); } @@ -547,6 +548,11 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist, } if (ops) code = (*ops->destroy)(&rock, code); + + /* if we errored, can't trust this. */ + if (code) + *doProcessFS = 0; + return code; } -- 2.39.5