Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6e32227 authored by Eric Sandeen's avatar Eric Sandeen Committed by Lachlan McIlroy
Browse files

[XFS] Remove the rest of the macro-to-function indirections.



Remove the last of the macros-defined-to-static-functions.

Signed-off-by: default avatarEric Sandeen <sandeen@sandeen.net>
Reviewed-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent b828d8c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -431,7 +431,7 @@ xfs_qm_dqalloc(
	/*
	/*
	 * Initialize the bmap freelist prior to calling bmapi code.
	 * Initialize the bmap freelist prior to calling bmapi code.
	 */
	 */
	XFS_BMAP_INIT(&flist, &firstblock);
	xfs_bmap_init(&flist, &firstblock);
	xfs_ilock(quotip, XFS_ILOCK_EXCL);
	xfs_ilock(quotip, XFS_ILOCK_EXCL);
	/*
	/*
	 * Return if this type of quotas is turned off while we didn't
	 * Return if this type of quotas is turned off while we didn't
+3 −3
Original line number Original line Diff line number Diff line
@@ -244,8 +244,8 @@ typedef struct xfs_perag
#define	XFS_AG_CHECK_DADDR(mp,d,len)	\
#define	XFS_AG_CHECK_DADDR(mp,d,len)	\
	((len) == 1 ? \
	((len) == 1 ? \
	    ASSERT((d) == XFS_SB_DADDR || \
	    ASSERT((d) == XFS_SB_DADDR || \
		   XFS_DADDR_TO_AGBNO(mp, d) != XFS_SB_DADDR) : \
		   xfs_daddr_to_agbno(mp, d) != XFS_SB_DADDR) : \
	    ASSERT(XFS_DADDR_TO_AGNO(mp, d) == \
	    ASSERT(xfs_daddr_to_agno(mp, d) == \
		   XFS_DADDR_TO_AGNO(mp, (d) + (len) - 1)))
		   xfs_daddr_to_agno(mp, (d) + (len) - 1)))


#endif	/* __XFS_AG_H__ */
#endif	/* __XFS_AG_H__ */
+1 −1
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@ xfs_allocbt_free_block(
	xfs_agblock_t		bno;
	xfs_agblock_t		bno;
	int			error;
	int			error;


	bno = XFS_DADDR_TO_AGBNO(cur->bc_mp, XFS_BUF_ADDR(bp));
	bno = xfs_daddr_to_agbno(cur->bc_mp, XFS_BUF_ADDR(bp));
	error = xfs_alloc_put_freelist(cur->bc_tp, agbp, NULL, bno, 1);
	error = xfs_alloc_put_freelist(cur->bc_tp, agbp, NULL, bno, 1);
	if (error)
	if (error)
		return error;
		return error;
+13 −13
Original line number Original line Diff line number Diff line
@@ -374,7 +374,7 @@ xfs_attr_set_int(xfs_inode_t *dp, struct xfs_name *name,
		 * It won't fit in the shortform, transform to a leaf block.
		 * It won't fit in the shortform, transform to a leaf block.
		 * GROT: another possible req'mt for a double-split btree op.
		 * GROT: another possible req'mt for a double-split btree op.
		 */
		 */
		XFS_BMAP_INIT(args.flist, args.firstblock);
		xfs_bmap_init(args.flist, args.firstblock);
		error = xfs_attr_shortform_to_leaf(&args);
		error = xfs_attr_shortform_to_leaf(&args);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args.trans, args.flist,
			error = xfs_bmap_finish(&args.trans, args.flist,
@@ -956,7 +956,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
		 * Commit that transaction so that the node_addname() call
		 * Commit that transaction so that the node_addname() call
		 * can manage its own transactions.
		 * can manage its own transactions.
		 */
		 */
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_attr_leaf_to_node(args);
		error = xfs_attr_leaf_to_node(args);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
			error = xfs_bmap_finish(&args->trans, args->flist,
@@ -1057,7 +1057,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
		 * If the result is small enough, shrink it all into the inode.
		 * If the result is small enough, shrink it all into the inode.
		 */
		 */
		if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
		if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
			XFS_BMAP_INIT(args->flist, args->firstblock);
			xfs_bmap_init(args->flist, args->firstblock);
			error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
			error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
			/* bp is gone due to xfs_da_shrink_inode */
			/* bp is gone due to xfs_da_shrink_inode */
			if (!error) {
			if (!error) {
@@ -1135,7 +1135,7 @@ xfs_attr_leaf_removename(xfs_da_args_t *args)
	 * If the result is small enough, shrink it all into the inode.
	 * If the result is small enough, shrink it all into the inode.
	 */
	 */
	if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
	if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
		error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
		/* bp is gone due to xfs_da_shrink_inode */
		/* bp is gone due to xfs_da_shrink_inode */
		if (!error) {
		if (!error) {
@@ -1290,7 +1290,7 @@ restart:
			 * have been a b-tree.
			 * have been a b-tree.
			 */
			 */
			xfs_da_state_free(state);
			xfs_da_state_free(state);
			XFS_BMAP_INIT(args->flist, args->firstblock);
			xfs_bmap_init(args->flist, args->firstblock);
			error = xfs_attr_leaf_to_node(args);
			error = xfs_attr_leaf_to_node(args);
			if (!error) {
			if (!error) {
				error = xfs_bmap_finish(&args->trans,
				error = xfs_bmap_finish(&args->trans,
@@ -1331,7 +1331,7 @@ restart:
		 * in the index/blkno/rmtblkno/rmtblkcnt fields and
		 * in the index/blkno/rmtblkno/rmtblkcnt fields and
		 * in the index2/blkno2/rmtblkno2/rmtblkcnt2 fields.
		 * in the index2/blkno2/rmtblkno2/rmtblkcnt2 fields.
		 */
		 */
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_da_split(state);
		error = xfs_da_split(state);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
			error = xfs_bmap_finish(&args->trans, args->flist,
@@ -1443,7 +1443,7 @@ restart:
		 * Check to see if the tree needs to be collapsed.
		 * Check to see if the tree needs to be collapsed.
		 */
		 */
		if (retval && (state->path.active > 1)) {
		if (retval && (state->path.active > 1)) {
			XFS_BMAP_INIT(args->flist, args->firstblock);
			xfs_bmap_init(args->flist, args->firstblock);
			error = xfs_da_join(state);
			error = xfs_da_join(state);
			if (!error) {
			if (!error) {
				error = xfs_bmap_finish(&args->trans,
				error = xfs_bmap_finish(&args->trans,
@@ -1579,7 +1579,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
	 * Check to see if the tree needs to be collapsed.
	 * Check to see if the tree needs to be collapsed.
	 */
	 */
	if (retval && (state->path.active > 1)) {
	if (retval && (state->path.active > 1)) {
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_da_join(state);
		error = xfs_da_join(state);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
			error = xfs_bmap_finish(&args->trans, args->flist,
@@ -1630,7 +1630,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
						       == XFS_ATTR_LEAF_MAGIC);
						       == XFS_ATTR_LEAF_MAGIC);


		if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
		if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
			XFS_BMAP_INIT(args->flist, args->firstblock);
			xfs_bmap_init(args->flist, args->firstblock);
			error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
			error = xfs_attr_leaf_to_shortform(bp, args, forkoff);
			/* bp is gone due to xfs_da_shrink_inode */
			/* bp is gone due to xfs_da_shrink_inode */
			if (!error) {
			if (!error) {
@@ -2069,7 +2069,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
		/*
		/*
		 * Allocate a single extent, up to the size of the value.
		 * Allocate a single extent, up to the size of the value.
		 */
		 */
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		nmap = 1;
		nmap = 1;
		error = xfs_bmapi(args->trans, dp, (xfs_fileoff_t)lblkno,
		error = xfs_bmapi(args->trans, dp, (xfs_fileoff_t)lblkno,
				  blkcnt,
				  blkcnt,
@@ -2123,7 +2123,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
		/*
		/*
		 * Try to remember where we decided to put the value.
		 * Try to remember where we decided to put the value.
		 */
		 */
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		nmap = 1;
		nmap = 1;
		error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno,
		error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno,
				  args->rmtblkcnt,
				  args->rmtblkcnt,
@@ -2188,7 +2188,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
		/*
		/*
		 * Try to remember where we decided to put the value.
		 * Try to remember where we decided to put the value.
		 */
		 */
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		nmap = 1;
		nmap = 1;
		error = xfs_bmapi(NULL, args->dp, (xfs_fileoff_t)lblkno,
		error = xfs_bmapi(NULL, args->dp, (xfs_fileoff_t)lblkno,
					args->rmtblkcnt,
					args->rmtblkcnt,
@@ -2229,7 +2229,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
	blkcnt = args->rmtblkcnt;
	blkcnt = args->rmtblkcnt;
	done = 0;
	done = 0;
	while (!done) {
	while (!done) {
		XFS_BMAP_INIT(args->flist, args->firstblock);
		xfs_bmap_init(args->flist, args->firstblock);
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
				    XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				    XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				    1, args->firstblock, args->flist,
				    1, args->firstblock, args->flist,
+83 −83

File changed.

Preview size limit exceeded, changes collapsed.

Loading