diff options
author | Tim Schumacher <[email protected]> | 2018-09-26 19:29:26 +0200 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-11-08 14:38:28 -0800 |
commit | f8f4e137761244aa21bae31dba890a293abd6997 (patch) | |
tree | 0d7831a908de28c56ca97120d36138e1aeb1336b /module/zfs/dbuf.c | |
parent | 5f07d51751bdee2dbba0a88de8ccb479357f5411 (diff) |
Linux 4.19-rc3+ compat: Remove refcount_t compat
torvalds/linux@59b57717f ("blkcg: delay blkg destruction until
after writeback has finished") added a refcount_t to the blkcg
structure. Due to the refcount_t compatibility code, zfs_refcount_t
was used by mistake.
Resolve this by removing the compatibility code and replacing the
occurrences of refcount_t with zfs_refcount_t.
Reviewed-by: Franz Pletz <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tim Schumacher <[email protected]>
Closes #7885
Closes #7932
Diffstat (limited to 'module/zfs/dbuf.c')
-rw-r--r-- | module/zfs/dbuf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 6edb39d6d..5101c848b 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -104,7 +104,7 @@ static boolean_t dbuf_evict_thread_exit; * become eligible for arc eviction. */ static multilist_t *dbuf_cache; -static refcount_t dbuf_cache_size; +static zfs_refcount_t dbuf_cache_size; unsigned long dbuf_cache_max_bytes = 100 * 1024 * 1024; /* Cap the size of the dbuf cache to log2 fraction of arc size. */ @@ -2384,7 +2384,7 @@ dbuf_create(dnode_t *dn, uint8_t level, uint64_t blkid, ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT || refcount_count(&dn->dn_holds) > 0); - (void) refcount_add(&dn->dn_holds, db); + (void) zfs_refcount_add(&dn->dn_holds, db); atomic_inc_32(&dn->dn_dbufs_count); dprintf_dbuf(db, "db=%p\n", db); @@ -2749,7 +2749,7 @@ __dbuf_hold_impl(struct dbuf_hold_impl_data *dh) (void) refcount_remove_many(&dbuf_cache_size, dh->dh_db->db.db_size, dh->dh_db); } - (void) refcount_add(&dh->dh_db->db_holds, dh->dh_tag); + (void) zfs_refcount_add(&dh->dh_db->db_holds, dh->dh_tag); DBUF_VERIFY(dh->dh_db); mutex_exit(&dh->dh_db->db_mtx); @@ -2873,7 +2873,7 @@ dbuf_rm_spill(dnode_t *dn, dmu_tx_t *tx) void dbuf_add_ref(dmu_buf_impl_t *db, void *tag) { - int64_t holds = refcount_add(&db->db_holds, tag); + int64_t holds = zfs_refcount_add(&db->db_holds, tag); VERIFY3S(holds, >, 1); } @@ -2893,7 +2893,7 @@ dbuf_try_add_ref(dmu_buf_t *db_fake, objset_t *os, uint64_t obj, uint64_t blkid, if (found_db != NULL) { if (db == found_db && dbuf_refcount(db) > db->db_dirtycnt) { - (void) refcount_add(&db->db_holds, tag); + (void) zfs_refcount_add(&db->db_holds, tag); result = B_TRUE; } mutex_exit(&found_db->db_mtx); |