What justification is there for writing if statements without braces? It just makes your diffs look fugly when you need to add another line to condition.
- if (sess->state == SMB2_SESSION_VALID)
+ if (sess->state == SMB2_SESSION_VALID) {
ksmbd_free_user(sess->user);
+ sess->user = NULL;
+ }