|
@@ -165,8 +165,10 @@ static void inotify_free_group_priv(struct fsnotify_group *group)
|
|
|
/* ideally the idr is empty and we won't hit the BUG in the callback */
|
|
|
idr_for_each(&group->inotify_data.idr, idr_callback, group);
|
|
|
idr_destroy(&group->inotify_data.idr);
|
|
|
- atomic_dec(&group->inotify_data.user->inotify_devs);
|
|
|
- free_uid(group->inotify_data.user);
|
|
|
+ if (group->inotify_data.user) {
|
|
|
+ atomic_dec(&group->inotify_data.user->inotify_devs);
|
|
|
+ free_uid(group->inotify_data.user);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void inotify_free_event(struct fsnotify_event *fsn_event)
|