Hello I didn't notice that I reversed them accidentally when pressing autocomplete.
If the page size is bigger than the value size, it will return 0 ,which is an invalid value The size, as far as I know, doesn't need any checks, because it is a signed value, I checked mode only because it is unsigned short. On Mon, Nov 23, 2026 at 7:37 PM Alperen Erkan <[email protected]> wrote: > Hello Ahmed, > > Thanks, this fixes the reversed comparison. With 4 KiB pages, an 8 KiB > request > now gives two pages. Could you also confirm the intended behavior for an > explicit > size of zero and for a mode-only update? Zero maps to one page if it > reaches this > branch, while a mode-only update should preserve the existing limit. > > Best regards, > Alperen Erkan > > On Mon, Nov 23, 2026 at 7:26 PM Ahmed Khider <[email protected]> wrote: > >> --- >> tmpfs/tmpfs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c >> index 183e0190..acd53312 100644 >> --- a/tmpfs/tmpfs.c >> +++ b/tmpfs/tmpfs.c >> @@ -257,7 +257,7 @@ parse_opt (int key, char *arg, struct argp_state >> *state) >> >> case ARGP_KEY_SUCCESS: >> /* All options parse successfully, so implement ours if possible. >> */ >> - if (vm_page_size > values->size) >> + if ( values->size > vm_page_size ) >> { >> tmpfs_page_limit = values->size / vm_page_size; >> if (values->mode != (mode_t)-1) >> -- >> 2.47.3 >> >> >>
