diff options
| author | Patrick Delaunay <[email protected]> | 2026-06-09 11:00:41 +0200 |
|---|---|---|
| committer | Heiko Schocher <[email protected]> | 2026-07-08 11:28:23 +0200 |
| commit | 4c600f981343ca57cb324c643fec5663d50649e0 (patch) | |
| tree | 55fafef7299c5a28ae1e2e9bdd05570d33d2d18d /include | |
| parent | ee5d46b45ec0c63f8f9dd1e816e0dac3452ccc3d (diff) | |
fs: ubifs: fix ubifs_finddir() result check
ubifs_finddir() can return a negative error code (-ENOMEM or
PTR_ERR(dent)) and returns 1 when the name is found in the directory.
Fix the result check accordingly.
This fixes file existence detection (for "test -e") when U-Boot uses
UBIFS through ops ubifs_exists(). Since this function is also called
before other file operations, commands such as "load" could be executed
on a non-existing file without reporting an error.
Fixes: 0cab29ff467e ("fs: ubifs: Fix and rework error handling in ubifs_finddir")
Signed-off-by: Patrick Delaunay <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
