diff options
| author | Brian Foster <[email protected]> | 2023-08-14 10:49:42 -0400 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2023-10-22 17:10:11 -0400 |
| commit | 8c9b0f7bdc4183573d57f0442693d99cc9758617 (patch) | |
| tree | cefa2eeb55d171b36a7994cf27e4e8511d298b14 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 029b85fe417c36b5689093dd4861c7980299a50f (diff) | |
bcachefs: fix up wonky error handling in bch2_seek_pagecache_hole()
The folio_hole_offset() helper returns a mix of bool and int types.
The latter is to support a possible -EAGAIN error code when using
nonblocking locks. This is not only confusing, but the only caller
also essentially ignores errors outside of stopping the range
iteration. This means an -EAGAIN error can't return directly from
folio_hole_offset() and may be lost via bch2_clamp_data_hole().
Fix up the error handling and make it more readable.
__filemap_get_folio() returns -ENOENT instead of NULL when no folio
exists, so reuse the same error code in folio_hole_offset(). Fix up
bch2_seek_pagecache_hole() to return the current offset on -ENOENT,
but otherwise return unexpected error code up to the caller.
Signed-off-by: Brian Foster <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions