On Thu, Jan 30, 2025 at 09:45:50AM +0100, Miklos Szeredi wrote: > On Thu, 30 Jan 2025 at 00:20, Christian Brauner <brauner@xxxxxxxxxx> wrote: > > > > For string options the kernel will raise the corresponding flag only if > > the string isn't empty. So check for the flag. > > Hmm, seems like this is going to be a common mistake. Probably. > > How about just putting a nul char at sm->str, which will solve this > once and for all (any unset str_ offset will point to this empty > string)? Agreed. > > Then we can say that instead of checking the mask for a string it's > okay to rely on it being empty by default. Right, but I do prefer checking whether the flag is raised or not. But we can just support both.