vol-bless: Detach, not put, volumes on completion
authorAndrew Deason <adeason@sinenomine.net>
Wed, 28 Jul 2010 22:47:21 +0000 (17:47 -0500)
committerDerrick Brashear <shadow@dementia.org>
Thu, 29 Jul 2010 14:31:47 +0000 (07:31 -0700)
vol-bless was just calling VPutVolume when it was done blessing or
unblessing a volume. Instead call VDetachVolume, so we actually give
the volume back to the fileserver when we are done if !nofssync.

Change-Id: Idc1e0c32cf5c1c9d2c130fee4b2f1a5f61ab1c3a
Reviewed-on: http://gerrit.openafs.org/2477
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/vol/vol-bless.c

index 993cfa1..18fdd02 100644 (file)
@@ -69,10 +69,10 @@ handleit(struct cmd_syndesc *as, void *arock)
     VUpdateVolume(&ec, vp);
     if (ec) {
        fprintf(stderr,"VUpdateVolume failed: %d\n", ec);
-       VPutVolume(vp);
+       VDetachVolume(&ec, vp);
        exit(1);
     }
-    VPutVolume(vp);
+    VDetachVolume(&ec, vp);
     return 0;
 }