Description of problem:
When nl-cache is enabled, glusterfs crash while activating graph.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. enable nl-cache
2. run glusterfs
glusterfs client crash
glusterfs run without error
This problem is in glusterfs_ctx_tw_get(). When ctx->tw is initialized to call glusterfs_ctx_tw_get, will call GF_REF_GET to add refcount and return the existing ctx->tw pointer. However, return of GF_REF_GET is an integer of ref counter, but incorrectly use as pointer to return.
I don't have permission to submit it to gerrit. Signing in with GitHub account gave me a result of "forbidden". Thus I put my fix here FYI.
Poornima - Could you have a look at the patch provided by Zhang and port it in gerrit?
Oops, it is my mistake that this is NOT an issue in master. Sorry for the inconvenience. I will close it.