On Wed, Jun 30, 2021 at 1:49 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > I think my bug report was not clear... :/ The code looks like this: > > sb = inode->i_sb; > > if (inode) ... > > The NULL check cannot be false because if "inode" is NULL we would have > already crashed when we dereference it on the line before. > > In this case, based on last years discussion, the "inode" pointer can't > be NULL. The debate is only whether the unnecessary NULL checks help > readability or hurt readability. > Right. Sorry, I forgot. Anyway, patch 11/15 of the same series changes this code to: sb = event_info->sb ?: inode->i_sb; So inode can and will be NULL coming from the caller of fsnotify_sb_error(sb, NULL). I think that should make smach happy? You can try to run it after patch 11/15 of this series. Thanks, Amir.