mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend: update cookie even on callback failure
No need to check status and always update cookie after invoking callback for bookmark_list() and bookmark_fsck().
This commit is contained in:
parent
78b80be2e5
commit
88e38bd38e
2 changed files with 1 additions and 19 deletions
|
@ -1906,9 +1906,6 @@ bookmark_fsck (
|
|||
status = fsck_apply(ctx, id, fsck_data, callback, user_data);
|
||||
#endif
|
||||
}
|
||||
if (status < 0) {
|
||||
return status;
|
||||
}
|
||||
|
||||
end:
|
||||
if (cookie_ptr != NULL) {
|
||||
|
@ -2053,10 +2050,7 @@ bookmark_list (
|
|||
continue;
|
||||
}
|
||||
status = callback(user_data, &buf);
|
||||
if (status < 0) {
|
||||
return status;
|
||||
}
|
||||
if (status > 0) {
|
||||
if (status != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3056,12 +3056,6 @@ bookmark_fsck (
|
|||
status = fsck_apply(ctx, id, fsck_data, &qctx);
|
||||
#endif
|
||||
}
|
||||
if (status < 0) {
|
||||
if (dentry_map == NULL) {
|
||||
free_dentmap(qctx.dentry_map);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
dentry_map = qctx.dentry_map;
|
||||
idx = qctx.next;
|
||||
|
||||
|
@ -3165,12 +3159,6 @@ bookmark_list (
|
|||
qctx.callback.list = callback;
|
||||
qctx.user_data = user_data;
|
||||
status = bookmark_do_list(ctx, id, off, flags, &qctx);
|
||||
if (status < 0) {
|
||||
if (dentry_map == NULL) {
|
||||
free_dentmap(qctx.dentry_map);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
dentry_map = qctx.dentry_map;
|
||||
|
||||
end:
|
||||
|
|
Loading…
Add table
Reference in a new issue