diff options
author | Xiubo Li <[email protected]> | 2022-07-11 12:11:21 +0800 |
---|---|---|
committer | Ilya Dryomov <[email protected]> | 2022-07-14 10:10:12 +0200 |
commit | fac47b43c760ea90e64b895dba60df0327be7775 (patch) | |
tree | ce9fe5b54a150c80acf4683288924f94a6b5cfc8 /scripts/bpf_doc.py | |
parent | 32346491ddf24599decca06190ebca03ff9de7f8 (diff) |
netfs: do not unlock and put the folio twice
check_write_begin() will unlock and put the folio when return
non-zero. So we should avoid unlocking and putting it twice in
netfs layer.
Change the way ->check_write_begin() works in the following two ways:
(1) Pass it a pointer to the folio pointer, allowing it to unlock and put
the folio prior to doing the stuff it wants to do, provided it clears
the folio pointer.
(2) Change the return values such that 0 with folio pointer set means
continue, 0 with folio pointer cleared means re-get and all error
codes indicating an error (no special treatment for -EAGAIN).
[ bagasdotme: use Sphinx code text syntax for *foliop pointer ]
Cc: [email protected]
Link: https://tracker.ceph.com/issues/56423
Link: https://lore.kernel.org/r/[email protected]
Co-developed-by: David Howells <[email protected]>
Signed-off-by: Xiubo Li <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions