aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io-buffered.c
diff options
context:
space:
mode:
authorGravatar Brian Foster <bfoster@redhat.com> 2023-08-14 10:49:42 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:10:11 -0400
commit8c9b0f7bdc4183573d57f0442693d99cc9758617 (patch)
treecefa2eeb55d171b36a7994cf27e4e8511d298b14 /fs/bcachefs/fs-io-buffered.c
parentbcachefs: Fix bkey format calculation (diff)
downloadlinux-8c9b0f7bdc4183573d57f0442693d99cc9758617.tar.gz
linux-8c9b0f7bdc4183573d57f0442693d99cc9758617.tar.bz2
linux-8c9b0f7bdc4183573d57f0442693d99cc9758617.zip
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 <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io-buffered.c')
0 files changed, 0 insertions, 0 deletions