Aurélien Aptel <aaptel@xxxxxxxx> writes: > if (cfid->refcount-- && cfid->is_valid) { Actually, let's not decrement in the condition :) void close_shroot(struct cached_fid *cfid) { mutex_lock(&cfid->fid_mutex); if (cfid->refcount > 0 && cfid->is_valid) { cifs_dbg(FYI, "clear cached root file handle\n"); SMB2_close(0, cfid->tcon, cfid->fid->persistent_fid, cfid->fid->volatile_fid); cfid->is_valid = false; cfid->file_all_info_is_valid = false; cfid->refcount--; } mutex_unlock(&cfid->fid_mutex); } -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)