On 23/08/2024 11:55, Kent Overstreet wrote:
On Fri, Aug 23, 2024 at 11:19:55AM GMT, Youling Tang wrote:
From: Youling Tang <tangyoul...@kylinos.cn>

- Reduces bkey_err() calls.
- Avoid redundant calls to bch2_trans_iter_exit() in some functions.
no, a function that returns an error should clean up after itself
Yes, functions should self-clean when they fail.

However, there are repeated calls to bch2_trans_iter_exit in
some functions, take lookup_inode() as an example,

When bkey_err(k) returns a non-zero, call bch2_trans_iter_exit()
once in bch2_bkey_get_iter(). It is then called again in
lookup_inode() via 'goto err'. (We can correct it by simply changing
it to 'return ret', but there are many similar cases.)

Thanks,
Youling.

Reply via email to