mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-29 04:06:57 +00:00
scoutfs: fix srch btree iref puts
The srch code was putting btree item refs outside of success. This is fine, but they only need to be put when btree ops return success and have set the reference. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+2
-2
@@ -964,8 +964,8 @@ retry:
|
||||
} else {
|
||||
ret = -EIO;
|
||||
}
|
||||
scoutfs_btree_put_iref(&iref);
|
||||
}
|
||||
scoutfs_btree_put_iref(&iref);
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOENT) {
|
||||
if (key.sk_type == SCOUTFS_SRCH_BLOCKS_TYPE) {
|
||||
@@ -999,8 +999,8 @@ retry:
|
||||
} else {
|
||||
ret = -EIO;
|
||||
}
|
||||
scoutfs_btree_put_iref(&iref);
|
||||
}
|
||||
scoutfs_btree_put_iref(&iref);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user