Re: [PATCH v5 3/3] userfaultfd: use per-vma locks in userfaultfd operations

From: Liam R. Howlett
Date: Tue Feb 13 2024 - 15:41:01 EST


* Lokesh Gidra <lokeshgidra@xxxxxxxxxx> [240213 14:55]:
..

>
> Regarding int vs long for 'err' type, I'm assuming you are ok with my
> explanation and I should keep long?

For such things, I check for consensus in existing code:
mm/mmap.c - int is used when not returning an address or struct
fs/userfaultfd.c - decoded to int before returning

I'd use int to keep consistent with fs/userfaultfd.c

Thanks,
Liam