Skip to content

Commit

Permalink
xfs: return is not a function
Browse files Browse the repository at this point in the history
return is not a function.  "return(EIO);" is silly;
"return (EIO);" moreso.  return is not a function.
Nuke the pointless parens.

[dchinner: catch a couple of extra cases in xfs_attr_list.c,
xfs_acl.c and xfs_linux.h.]

Signed-off-by: Eric Sandeen <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
sandeen authored and dchinner committed Jun 22, 2014
1 parent a497c3b commit d99831f
Show file tree
Hide file tree
Showing 14 changed files with 140 additions and 141 deletions.
46 changes: 23 additions & 23 deletions fs/xfs/xfs_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,27 +535,27 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)

retval = xfs_attr_shortform_lookup(args);
if ((args->flags & ATTR_REPLACE) && (retval == ENOATTR)) {
return(retval);
return retval;
} else if (retval == EEXIST) {
if (args->flags & ATTR_CREATE)
return(retval);
return retval;
retval = xfs_attr_shortform_remove(args);
ASSERT(retval == 0);
}

if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
args->valuelen >= XFS_ATTR_SF_ENTSIZE_MAX)
return(XFS_ERROR(ENOSPC));
return XFS_ERROR(ENOSPC);

newsize = XFS_ATTR_SF_TOTSIZE(args->dp);
newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);

forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize);
if (!forkoff)
return(XFS_ERROR(ENOSPC));
return XFS_ERROR(ENOSPC);

xfs_attr_shortform_add(args, forkoff);
return(0);
return 0;
}


Expand Down Expand Up @@ -642,7 +642,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
ASSERT(committed);
args->trans = NULL;
xfs_bmap_cancel(args->flist);
return(error);
return error;
}

/*
Expand All @@ -658,13 +658,13 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/
error = xfs_trans_roll(&args->trans, dp);
if (error)
return (error);
return error;

/*
* Fob the whole rest of the problem off on the Btree code.
*/
error = xfs_attr_node_addname(args);
return(error);
return error;
}

/*
Expand All @@ -673,7 +673,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/
error = xfs_trans_roll(&args->trans, dp);
if (error)
return (error);
return error;

/*
* If there was an out-of-line value, allocate the blocks we
Expand All @@ -684,7 +684,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
if (args->rmtblkno > 0) {
error = xfs_attr_rmtval_set(args);
if (error)
return(error);
return error;
}

/*
Expand All @@ -700,7 +700,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/
error = xfs_attr3_leaf_flipflags(args);
if (error)
return(error);
return error;

/*
* Dismantle the "old" attribute/value pair by removing
Expand All @@ -714,7 +714,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
if (args->rmtblkno) {
error = xfs_attr_rmtval_remove(args);
if (error)
return(error);
return error;
}

/*
Expand Down Expand Up @@ -744,7 +744,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
ASSERT(committed);
args->trans = NULL;
xfs_bmap_cancel(args->flist);
return(error);
return error;
}

/*
Expand Down Expand Up @@ -1031,7 +1031,7 @@ xfs_attr_node_addname(xfs_da_args_t *args)
if (args->rmtblkno > 0) {
error = xfs_attr_rmtval_set(args);
if (error)
return(error);
return error;
}

/*
Expand Down Expand Up @@ -1061,7 +1061,7 @@ xfs_attr_node_addname(xfs_da_args_t *args)
if (args->rmtblkno) {
error = xfs_attr_rmtval_remove(args);
if (error)
return(error);
return error;
}

/*
Expand Down Expand Up @@ -1134,8 +1134,8 @@ xfs_attr_node_addname(xfs_da_args_t *args)
if (state)
xfs_da_state_free(state);
if (error)
return(error);
return(retval);
return error;
return retval;
}

/*
Expand Down Expand Up @@ -1297,7 +1297,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)

out:
xfs_da_state_free(state);
return(error);
return error;
}

/*
Expand Down Expand Up @@ -1345,7 +1345,7 @@ xfs_attr_fillstate(xfs_da_state_t *state)
}
}

return(0);
return 0;
}

/*
Expand Down Expand Up @@ -1376,7 +1376,7 @@ xfs_attr_refillstate(xfs_da_state_t *state)
blk->blkno, blk->disk_blkno,
&blk->bp, XFS_ATTR_FORK);
if (error)
return(error);
return error;
} else {
blk->bp = NULL;
}
Expand All @@ -1395,13 +1395,13 @@ xfs_attr_refillstate(xfs_da_state_t *state)
blk->blkno, blk->disk_blkno,
&blk->bp, XFS_ATTR_FORK);
if (error)
return(error);
return error;
} else {
blk->bp = NULL;
}
}

return(0);
return 0;
}

/*
Expand Down Expand Up @@ -1455,5 +1455,5 @@ xfs_attr_node_get(xfs_da_args_t *args)
}

xfs_da_state_free(state);
return(retval);
return retval;
}
14 changes: 7 additions & 7 deletions fs/xfs/xfs_attr_inactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ xfs_attr3_leaf_freextent(
error = xfs_bmapi_read(dp, (xfs_fileoff_t)tblkno, tblkcnt,
&map, &nmap, XFS_BMAPI_ATTRFORK);
if (error) {
return(error);
return error;
}
ASSERT(nmap == 1);
ASSERT(map.br_startblock != DELAYSTARTBLOCK);
Expand All @@ -102,14 +102,14 @@ xfs_attr3_leaf_freextent(
*/
error = xfs_trans_roll(trans, dp);
if (error)
return (error);
return error;
}

tblkno += map.br_blockcount;
tblkcnt -= map.br_blockcount;
}

return(0);
return 0;
}

/*
Expand Down Expand Up @@ -256,7 +256,7 @@ xfs_attr3_node_inactive(
error = xfs_da3_node_read(*trans, dp, child_fsb, -2, &child_bp,
XFS_ATTR_FORK);
if (error)
return(error);
return error;
if (child_bp) {
/* save for re-read later */
child_blkno = XFS_BUF_ADDR(child_bp);
Expand Down Expand Up @@ -414,7 +414,7 @@ xfs_attr_inactive(xfs_inode_t *dp)
error = xfs_trans_reserve(trans, &M_RES(mp)->tr_attrinval, 0, 0);
if (error) {
xfs_trans_cancel(trans, 0);
return(error);
return error;
}
xfs_ilock(dp, XFS_ILOCK_EXCL);

Expand Down Expand Up @@ -443,10 +443,10 @@ xfs_attr_inactive(xfs_inode_t *dp)
error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES);
xfs_iunlock(dp, XFS_ILOCK_EXCL);

return(error);
return error;

out:
xfs_trans_cancel(trans, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
return(error);
return error;
}
Loading

0 comments on commit d99831f

Please sign in to comment.