Created attachment 13754 [details] Ralph's torture test and original fix. From Ralph Wuerthner <ralph.wuerthner@de.ibm.com>. I was able to recreate the panic on my test system with the attached 'smb2.delete-on-close-perms.FIND and set DOC.FIND and set DOC' smbtorture test. Please see also my proposed fix. Both patches apply on master.
Created attachment 13755 [details] git-am fix for master.
Created attachment 13761 [details] git-am fix for 4.7.next, 4.6.next. Cherry-picked from master.
Reassigning to Karolin for inclusion in 4.6 and 4.7.
(In reply to Ralph Böhme from comment #3) Pushed to autobuild-v4-{6,7}-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!