Jeff Layton has uploaded this change for review.

View Change

FSAL_UP: fix op_ctx handling in delegation recall/revoke codepaths

delegrecall_task calls dec_state_t_ref at the end of it, which can do a
subcall_task call. That requires a valid op_ctx pointer, but we will
have already reset op_ctx back to its original value at that point
(which may very well be NULL).

Fix the code to set up the op_ctx much earlier, on entry into the
function and then only switch it back at exit. Also, ensure we clear
out the export pointers just before we put the reference to ensure that
no subcall will attempt to use them.

Also, tighten up some similar op_ctx handling in other delegation
recall and revoke handling codepaths.

Change-Id: I2718515fe12448209502ba561f5bb2c40248faa7
Reported-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
Cc: Soumya Koduri <skoduri@redhat.com>
Fixes: 81caa34f9aca (set op_ctx during deleg revokes and recalls)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
M src/FSAL_UP/fsal_up_top.c
1 file changed, 34 insertions(+), 20 deletions(-)

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

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

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2718515fe12448209502ba561f5bb2c40248faa7
Gerrit-Change-Number: 418214
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton@redhat.com>
Gerrit-CC: Soumya <skoduri@redhat.com>