X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.c;h=da1d38e67b5ef80e4d381f15ceed0097093837bd;hb=64eff4764737408d0805a57ce95e564600e06c98;hp=687e8bc1df1f2daa4a85152bf605c6966c115d0f;hpb=436ca2bdb05daec97c40422f83fc68c13f90cd8f;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index 687e8bc1..da1d38e6 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -1120,8 +1120,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);