Add 'inline' keyword

The '__attribute__((always_inline))' does not strictly imply
'inline'.  Newer versions of gcc detect this misuse and issue
the following warning.  Including the missing 'inline' resolves
the build warning.

    ./module/zfs/dsl_scan.c:758:1:error: always_inline function
    might not be inlinable [-Werror=attributes]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf 2012-07-18 16:56:24 -07:00
parent 0a6b03d3b8
commit 10be533e33

View File

@ -346,8 +346,8 @@ static void dsl_scan_visitbp(blkptr_t *bp,
const zbookmark_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, const zbookmark_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf,
dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype,
dmu_tx_t *tx); dmu_tx_t *tx);
static void dsl_scan_visitdnode(dsl_scan_t *, dsl_dataset_t *ds, inline __attribute__((always_inline)) static void dsl_scan_visitdnode(
dmu_objset_type_t ostype, dsl_scan_t *, dsl_dataset_t *ds, dmu_objset_type_t ostype,
dnode_phys_t *dnp, arc_buf_t *buf, uint64_t object, dmu_tx_t *tx); dnode_phys_t *dnp, arc_buf_t *buf, uint64_t object, dmu_tx_t *tx);
void void
@ -648,7 +648,7 @@ dsl_scan_check_resume(dsl_scan_t *scn, const dnode_phys_t *dnp,
* Return nonzero on i/o error. * Return nonzero on i/o error.
* Return new buf to write out in *bufp. * Return new buf to write out in *bufp.
*/ */
__attribute__((always_inline)) static int inline __attribute__((always_inline)) static int
dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype, dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
dnode_phys_t *dnp, const blkptr_t *bp, dnode_phys_t *dnp, const blkptr_t *bp,
const zbookmark_t *zb, dmu_tx_t *tx, arc_buf_t **bufp) const zbookmark_t *zb, dmu_tx_t *tx, arc_buf_t **bufp)
@ -754,7 +754,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
return (0); return (0);
} }
__attribute__((always_inline)) static void inline __attribute__((always_inline)) static void
dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds, dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds,
dmu_objset_type_t ostype, dnode_phys_t *dnp, arc_buf_t *buf, dmu_objset_type_t ostype, dnode_phys_t *dnp, arc_buf_t *buf,
uint64_t object, dmu_tx_t *tx) uint64_t object, dmu_tx_t *tx)