Skip to content

Commit f13d760

Browse files
authored
Delete dead code: dbuf_loan_arcbuf
It's been dead ever since 5fa356e Sponsored by: ConnectWise Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alan Somers <[email protected]> Closes #17119
1 parent 4800181 commit f13d760

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

include/sys/dbuf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ dbuf_dirty_record_t *dbuf_dirty_lightweight(dnode_t *dn, uint64_t blkid,
401401
boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
402402
int dmu_buf_get_bp_from_dbuf(dmu_buf_impl_t *db, blkptr_t **bp);
403403
int dmu_buf_untransform_direct(dmu_buf_impl_t *db, spa_t *spa);
404-
arc_buf_t *dbuf_loan_arcbuf(dmu_buf_impl_t *db);
405404
void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data,
406405
bp_embedded_type_t etype, enum zio_compress comp,
407406
int uncompressed_size, int compressed_size, int byteorder, dmu_tx_t *tx);

module/zfs/dbuf.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,33 +1274,6 @@ dbuf_alloc_arcbuf(dmu_buf_impl_t *db)
12741274
return (arc_alloc_buf(spa, db, DBUF_GET_BUFC_TYPE(db), db->db.db_size));
12751275
}
12761276

1277-
/*
1278-
* Loan out an arc_buf for read. Return the loaned arc_buf.
1279-
*/
1280-
arc_buf_t *
1281-
dbuf_loan_arcbuf(dmu_buf_impl_t *db)
1282-
{
1283-
arc_buf_t *abuf;
1284-
1285-
ASSERT(db->db_blkid != DMU_BONUS_BLKID);
1286-
mutex_enter(&db->db_mtx);
1287-
if (arc_released(db->db_buf) || zfs_refcount_count(&db->db_holds) > 1) {
1288-
int blksz = db->db.db_size;
1289-
spa_t *spa = db->db_objset->os_spa;
1290-
1291-
mutex_exit(&db->db_mtx);
1292-
abuf = arc_loan_buf(spa, B_FALSE, blksz);
1293-
memcpy(abuf->b_data, db->db.db_data, blksz);
1294-
} else {
1295-
abuf = db->db_buf;
1296-
arc_loan_inuse_buf(abuf, db);
1297-
db->db_buf = NULL;
1298-
dbuf_clear_data(db);
1299-
mutex_exit(&db->db_mtx);
1300-
}
1301-
return (abuf);
1302-
}
1303-
13041277
/*
13051278
* Calculate which level n block references the data at the level 0 offset
13061279
* provided.
@@ -5390,7 +5363,6 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
53905363
EXPORT_SYMBOL(dbuf_find);
53915364
EXPORT_SYMBOL(dbuf_is_metadata);
53925365
EXPORT_SYMBOL(dbuf_destroy);
5393-
EXPORT_SYMBOL(dbuf_loan_arcbuf);
53945366
EXPORT_SYMBOL(dbuf_whichblock);
53955367
EXPORT_SYMBOL(dbuf_read);
53965368
EXPORT_SYMBOL(dbuf_unoverride);

0 commit comments

Comments
 (0)