Madhu Thorat has uploaded this change for review.

View Change

Don't call mdcache_locate_host in mdc_lookup if mdc_get_parent fails

Currently in mdc_lookup() we pass 'tmpfh' variable to mdc_get_parent().
But if lookup() fails in mdc_get_parent() and if
entry->fsobj.fsdir.parent.len==0 then the 'tmpfh' passed by mdc_lookup()
doesn't get filled. After this the uninitalized 'tmpfh' in mdc_lookup()
gets passed to mdcache_locate_host() and its usage leads to a crash.
Fixed this by returning 'status' from the mdc_get_parent(), in case of
error status we don't call mdcache_locate_host() now.

Change-Id: I4c80df269e00960146135e0c67bd1964b9f9a3e1
Signed-off-by: Madhu Thorat <madhu.punjabi@in.ibm.com>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_int.h
2 files changed, 12 insertions(+), 8 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/08/456308/1

To view, visit change 456308. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I4c80df269e00960146135e0c67bd1964b9f9a3e1
Gerrit-Change-Number: 456308
Gerrit-PatchSet: 1
Gerrit-Owner: Madhu Thorat <madhu.punjabi@in.ibm.com>
Gerrit-MessageType: newchange