afs: Use common cleanup code for lockctl EINVAL
[openafs.git] / src / afs / VNOPS / afs_vnop_flock.c
index 0e92fc0..37e58ed 100644 (file)
@@ -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)