X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.c;fp=lttng-events.c;h=a4570b7b45a7d175ec2cf03680c7376786464eef;hb=98d7281c8ca3f6c99c1d3495a4727aa411013b75;hp=f4206c549c39f7f0d6f62e5a668ad7706b2877ba;hpb=8a88382fb09bbeda443044ee8cdb8f92040636bc;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index f4206c54..a4570b7b 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -1140,8 +1140,8 @@ int lttng_session_list_tracker_pids(struct lttng_session *session) ret = PTR_ERR(tracker_pids_list_file); goto file_error; } - if (atomic_long_add_unless(&session->file->f_count, - 1, INT_MAX) == INT_MAX) { + if (!atomic_long_add_unless(&session->file->f_count, 1, LONG_MAX)) { + ret = -EOVERFLOW; goto refcount_error; } ret = lttng_tracker_pids_list_fops.open(NULL, tracker_pids_list_file);