All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] submit_bh: Drop unnecessary return values and API users
@ 2022-06-20  5:58 Ritesh Harjani
  2022-06-20  5:58 ` [RFC 1/3] jbd2: Drop useless return value of submit_bh Ritesh Harjani
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ritesh Harjani @ 2022-06-20  5:58 UTC (permalink / raw)
  To: linux-ext4, linux-fsdevel; +Cc: Jan Kara, Alexander Viro, Ritesh Harjani

submit_bh/submit_bh_wbc are non-blocking functions which just submits
the bio and returns. The caller of submit_bh/submit_bh_wbc needs to wait
on buffer till I/O completion and then check buffer head's b_state field
to know if there was any I/O error.

Hence there is no need for these functions to have any return type.
Even now they always returns 0. Hence drop the return value and make
their return type as void to avoid any confusion.


Ritesh Harjani (3):
  jbd2: Drop useless return value of submit_bh
  fs/buffer: Drop useless return value of submit_bh
  fs/buffer: Make submit_bh & submit_bh_wbc return type as void

 fs/buffer.c                 | 19 ++++++++-----------
 fs/jbd2/commit.c            | 11 +++++------
 fs/jbd2/journal.c           |  6 ++----
 include/linux/buffer_head.h |  2 +-
 4 files changed, 16 insertions(+), 22 deletions(-)

--
2.35.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-07-18 17:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20  5:58 [RFC 0/3] submit_bh: Drop unnecessary return values and API users Ritesh Harjani
2022-06-20  5:58 ` [RFC 1/3] jbd2: Drop useless return value of submit_bh Ritesh Harjani
2022-06-20  6:39   ` Christoph Hellwig
2022-06-20  9:39   ` Jan Kara
2022-06-21  1:39   ` Matthew Wilcox
2022-07-04  9:01     ` Ritesh Harjani
2022-07-18 17:55       ` Ritesh Harjani
2022-06-20  5:58 ` [RFC 2/3] fs/buffer: " Ritesh Harjani
2022-06-20  6:39   ` Christoph Hellwig
2022-06-20  9:40   ` Jan Kara
2022-06-20  5:58 ` [RFC 3/3] fs/buffer: Make submit_bh & submit_bh_wbc return type as void Ritesh Harjani
2022-06-20  6:40   ` Christoph Hellwig
2022-06-20  9:41   ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.