[ Sorry about HTML crud, on mobile right now ]
- struct linux_dirent __user * dirent;
+ struct linux_dirent __user * dirent, *dirent0;
Patch looks better, but those names are horrid.
Please just use "prev" for the previous dirent, and leave the current one as "dirent".
I think that's going to be a lot more legible. But no numbering.
Linus