diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-17 23:06:38 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:37 -0400 |
commit | 549d173c1bd9b58c2ad41217522462e012a6545f (patch) | |
tree | 9bf146d761ae1f81ba18ec45a1bda63cb47549eb /fs/bcachefs/dirent.c | |
parent | 0990efaeeab14de1e3e3bf2791808afebadd1cc4 (diff) | |
download | linux-549d173c1bd9b58c2ad41217522462e012a6545f.tar.gz linux-549d173c1bd9b58c2ad41217522462e012a6545f.tar.bz2 linux-549d173c1bd9b58c2ad41217522462e012a6545f.zip |
bcachefs: EINTR -> BCH_ERR_transaction_restart
Now that we have error codes, with subtypes, we can switch to our own
error code for transaction restarts - and even better, a distinct error
code for each transaction restart reason: clearer code and better
debugging.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/dirent.c')
-rw-r--r-- | fs/bcachefs/dirent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c index 0cbb765cde54..4d942d224a08 100644 --- a/fs/bcachefs/dirent.c +++ b/fs/bcachefs/dirent.c @@ -471,7 +471,7 @@ retry: ret = __bch2_dirent_lookup_trans(&trans, &iter, dir, hash_info, name, inum, 0); - if (ret == -EINTR) + if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) goto retry; if (!ret) bch2_trans_iter_exit(&trans, &iter); @@ -556,7 +556,7 @@ retry: } bch2_trans_iter_exit(&trans, &iter); err: - if (ret == -EINTR) + if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) goto retry; bch2_trans_exit(&trans); |