diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h index e69464809a42..49f98765a940 100644 --- a/include/sys/dbuf.h +++ b/include/sys/dbuf.h @@ -399,7 +399,6 @@ dbuf_dirty_record_t *dbuf_dirty_lightweight(dnode_t *dn, uint64_t blkid, boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx); int dmu_buf_get_bp_from_dbuf(dmu_buf_impl_t *db, blkptr_t **bp); int dmu_buf_untransform_direct(dmu_buf_impl_t *db, spa_t *spa); -arc_buf_t *dbuf_loan_arcbuf(dmu_buf_impl_t *db); void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data, bp_embedded_type_t etype, enum zio_compress comp, int uncompressed_size, int compressed_size, int byteorder, dmu_tx_t *tx); diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 5212751f9a63..28f744c6a467 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -1273,33 +1273,6 @@ dbuf_alloc_arcbuf(dmu_buf_impl_t *db) return (arc_alloc_buf(spa, db, DBUF_GET_BUFC_TYPE(db), db->db.db_size)); } -/* - * Loan out an arc_buf for read. Return the loaned arc_buf. - */ -arc_buf_t * -dbuf_loan_arcbuf(dmu_buf_impl_t *db) -{ - arc_buf_t *abuf; - - ASSERT(db->db_blkid != DMU_BONUS_BLKID); - mutex_enter(&db->db_mtx); - if (arc_released(db->db_buf) || zfs_refcount_count(&db->db_holds) > 1) { - int blksz = db->db.db_size; - spa_t *spa = db->db_objset->os_spa; - - mutex_exit(&db->db_mtx); - abuf = arc_loan_buf(spa, B_FALSE, blksz); - memcpy(abuf->b_data, db->db.db_data, blksz); - } else { - abuf = db->db_buf; - arc_loan_inuse_buf(abuf, db); - db->db_buf = NULL; - dbuf_clear_data(db); - mutex_exit(&db->db_mtx); - } - return (abuf); -} - /* * Calculate which level n block references the data at the level 0 offset * provided. @@ -5386,7 +5359,6 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx) EXPORT_SYMBOL(dbuf_find); EXPORT_SYMBOL(dbuf_is_metadata); EXPORT_SYMBOL(dbuf_destroy); -EXPORT_SYMBOL(dbuf_loan_arcbuf); EXPORT_SYMBOL(dbuf_whichblock); EXPORT_SYMBOL(dbuf_read); EXPORT_SYMBOL(dbuf_unoverride);