viced: Don't store rc from IH_DEC on error path
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 22 Feb 2013 10:16:10 +0000 (10:16 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:40:43 +0000 (11:40 -0800)
If CopyOnWrite has already failed, and is taking the volume offline
for salvage we can't (and don't) do anything with further errors from
IH_DEC. Instead of assigning these to 'rc', just ignore them.

Caught by clang-analyzer

Change-Id: I7bcd82f124740e3ca3d11cb2b079aa7ea5751cf9
Reviewed-on: http://gerrit.openafs.org/9239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/viced/afsfileprocs.c

index d1376f7..b27d7dd 100644 (file)
@@ -1394,7 +1394,7 @@ CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len)
                FDH_REALLYCLOSE(newFdP);
                IH_RELEASE(newH);
                FDH_REALLYCLOSE(targFdP);
-               rc = IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr));
+               IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr));
                free(buff);
                VTakeOffline(volptr);
                return EIO;