static struct fsnotify_event *get_one_event(struct fsnotify_group *group,
size_t count)
{
- BUG_ON(IS_ENABLED(CONFIG_SMP) &&
- !spin_is_locked(&group->notification_lock));
+ assert_spin_locked(&group->notification_lock);
pr_debug("%s: group=%p count=%zd\n", __func__, group, count);
/* return true if the notify queue is empty, false otherwise */
bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group)
{
- BUG_ON(IS_ENABLED(CONFIG_SMP) &&
- !spin_is_locked(&group->notification_lock));
+ assert_spin_locked(&group->notification_lock);
return list_empty(&group->notification_list) ? true : false;
}
{
struct fsnotify_event *event;
- BUG_ON(IS_ENABLED(CONFIG_SMP) &&
- !spin_is_locked(&group->notification_lock));
+ assert_spin_locked(&group->notification_lock);
pr_debug("%s: group=%p\n", __func__, group);
*/
struct fsnotify_event *fsnotify_peek_first_event(struct fsnotify_group *group)
{
- BUG_ON(IS_ENABLED(CONFIG_SMP) &&
- !spin_is_locked(&group->notification_lock));
+ assert_spin_locked(&group->notification_lock);
return list_first_entry(&group->notification_list,
struct fsnotify_event, list);