From: Andrew Deason Date: Tue, 2 Oct 2012 20:04:47 +0000 (-0500) Subject: afs: Use common cleanup code for lockctl EINVAL X-Git-Tag: upstream/1.8.0_pre1^2~1944 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=eae608d99a5ae94624200f91af6ed818c9f6612b;p=packages%2Fo%2Fopenafs.git afs: Use common cleanup code for lockctl EINVAL afs_lockctl has common cleanup code in the 'done' label. Use it here, instead of trying to duplicate it. Currently this code path appears to not be dropping the discon lock, which this rectifies. Change-Id: I136a78bc3235454db7e3d69bb79b0061cfcab265 Reviewed-on: http://gerrit.openafs.org/8196 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/afs/VNOPS/afs_vnop_flock.c b/src/afs/VNOPS/afs_vnop_flock.c index 0e92fc049..37e58edb3 100644 --- a/src/afs/VNOPS/afs_vnop_flock.c +++ b/src/afs/VNOPS/afs_vnop_flock.c @@ -606,8 +606,8 @@ int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd, else if (af->l_type == F_UNLCK) code = LOCK_UN; else { - afs_PutFakeStat(&fakestate); - return EINVAL; /* unknown lock type */ + code = EINVAL; /* unknown lock type */ + goto done; } if (((acmd == F_SETLK) #if defined(AFS_SGI_ENV)