Module Name:    src
Committed By:   joerg
Date:           Fri Feb 19 19:25:59 UTC 2016

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: dbuf.c

Log Message:
Don't use #pragma weak to implicitly change argument types.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.5
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c:1.4	Sat Feb 27 23:43:53 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c	Fri Feb 19 19:25:59 2016
@@ -1267,7 +1267,13 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_
 	return (0);
 }
 
-#pragma weak dmu_buf_will_dirty = dbuf_will_dirty
+__attribute__((__weak__)) void
+dmu_buf_will_dirty(dmu_buf_t *db_fake, dmu_tx_t *tx)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_will_dirty(db, tx);
+}
+
 void
 dbuf_will_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
 {
@@ -1309,7 +1315,13 @@ dmu_buf_will_fill(dmu_buf_t *db_fake, dm
 	(void) dbuf_dirty(db, tx);
 }
 
-#pragma weak dmu_buf_fill_done = dbuf_fill_done
+__attribute__((__weak__)) void
+dmu_buf_fill_done(dmu_buf_t *db_fake, dmu_tx_t *tx)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_fill_done(db, tx);
+}
+
 /* ARGSUSED */
 void
 dbuf_fill_done(dmu_buf_impl_t *db, dmu_tx_t *tx)
@@ -1815,7 +1827,13 @@ dbuf_create_bonus(dnode_t *dn)
 	dn->dn_bonus = dbuf_create(dn, 0, DB_BONUS_BLKID, dn->dn_dbuf, NULL);
 }
 
-#pragma weak dmu_buf_add_ref = dbuf_add_ref
+__attribute__((__weak__)) void
+dmu_buf_add_ref(dmu_buf_t *db_fake, void *tag)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_add_ref(db, tag);
+}
+
 void
 dbuf_add_ref(dmu_buf_impl_t *db, void *tag)
 {
@@ -1823,7 +1841,13 @@ dbuf_add_ref(dmu_buf_impl_t *db, void *t
 	ASSERT(holds > 1);
 }
 
-#pragma weak dmu_buf_rele = dbuf_rele
+__attribute__((__weak__)) void
+dmu_buf_rele(dmu_buf_t *db_fake, void *tag)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	dbuf_rele(db, tag);
+}
+
 void
 dbuf_rele(dmu_buf_impl_t *db, void *tag)
 {
@@ -1889,7 +1913,13 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db,
 	}
 }
 
-#pragma weak dmu_buf_refcount = dbuf_refcount
+__attribute__((__weak__)) uint64_t
+dmu_buf_refcount(dmu_buf_t *db_fake)
+{
+	dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+	return dbuf_refcount(db);
+}
+
 uint64_t
 dbuf_refcount(dmu_buf_impl_t *db)
 {

Reply via email to