xfs: return is not a function

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 <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Eric Sandeen 2014-06-22 15:03:54 +10:00 committed by Dave Chinner
parent a497c3ba1d
commit d99831ff39
14 changed files with 140 additions and 141 deletions

View File

@ -535,27 +535,27 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)
retval = xfs_attr_shortform_lookup(args); retval = xfs_attr_shortform_lookup(args);
if ((args->flags & ATTR_REPLACE) && (retval == ENOATTR)) { if ((args->flags & ATTR_REPLACE) && (retval == ENOATTR)) {
return(retval); return retval;
} else if (retval == EEXIST) { } else if (retval == EEXIST) {
if (args->flags & ATTR_CREATE) if (args->flags & ATTR_CREATE)
return(retval); return retval;
retval = xfs_attr_shortform_remove(args); retval = xfs_attr_shortform_remove(args);
ASSERT(retval == 0); ASSERT(retval == 0);
} }
if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX || if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
args->valuelen >= 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_TOTSIZE(args->dp);
newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen); newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);
forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize); forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize);
if (!forkoff) if (!forkoff)
return(XFS_ERROR(ENOSPC)); return XFS_ERROR(ENOSPC);
xfs_attr_shortform_add(args, forkoff); xfs_attr_shortform_add(args, forkoff);
return(0); return 0;
} }
@ -642,7 +642,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
ASSERT(committed); ASSERT(committed);
args->trans = NULL; args->trans = NULL;
xfs_bmap_cancel(args->flist); xfs_bmap_cancel(args->flist);
return(error); return error;
} }
/* /*
@ -658,13 +658,13 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/ */
error = xfs_trans_roll(&args->trans, dp); error = xfs_trans_roll(&args->trans, dp);
if (error) if (error)
return (error); return error;
/* /*
* Fob the whole rest of the problem off on the Btree code. * Fob the whole rest of the problem off on the Btree code.
*/ */
error = xfs_attr_node_addname(args); error = xfs_attr_node_addname(args);
return(error); return error;
} }
/* /*
@ -673,7 +673,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/ */
error = xfs_trans_roll(&args->trans, dp); error = xfs_trans_roll(&args->trans, dp);
if (error) if (error)
return (error); return error;
/* /*
* If there was an out-of-line value, allocate the blocks we * If there was an out-of-line value, allocate the blocks we
@ -684,7 +684,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
if (args->rmtblkno > 0) { if (args->rmtblkno > 0) {
error = xfs_attr_rmtval_set(args); error = xfs_attr_rmtval_set(args);
if (error) if (error)
return(error); return error;
} }
/* /*
@ -700,7 +700,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
*/ */
error = xfs_attr3_leaf_flipflags(args); error = xfs_attr3_leaf_flipflags(args);
if (error) if (error)
return(error); return error;
/* /*
* Dismantle the "old" attribute/value pair by removing * Dismantle the "old" attribute/value pair by removing
@ -714,7 +714,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
if (args->rmtblkno) { if (args->rmtblkno) {
error = xfs_attr_rmtval_remove(args); error = xfs_attr_rmtval_remove(args);
if (error) if (error)
return(error); return error;
} }
/* /*
@ -744,7 +744,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
ASSERT(committed); ASSERT(committed);
args->trans = NULL; args->trans = NULL;
xfs_bmap_cancel(args->flist); xfs_bmap_cancel(args->flist);
return(error); return error;
} }
/* /*
@ -1031,7 +1031,7 @@ restart:
if (args->rmtblkno > 0) { if (args->rmtblkno > 0) {
error = xfs_attr_rmtval_set(args); error = xfs_attr_rmtval_set(args);
if (error) if (error)
return(error); return error;
} }
/* /*
@ -1061,7 +1061,7 @@ restart:
if (args->rmtblkno) { if (args->rmtblkno) {
error = xfs_attr_rmtval_remove(args); error = xfs_attr_rmtval_remove(args);
if (error) if (error)
return(error); return error;
} }
/* /*
@ -1134,8 +1134,8 @@ out:
if (state) if (state)
xfs_da_state_free(state); xfs_da_state_free(state);
if (error) if (error)
return(error); return error;
return(retval); return retval;
} }
/* /*
@ -1297,7 +1297,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
out: out:
xfs_da_state_free(state); xfs_da_state_free(state);
return(error); return error;
} }
/* /*
@ -1345,7 +1345,7 @@ xfs_attr_fillstate(xfs_da_state_t *state)
} }
} }
return(0); return 0;
} }
/* /*
@ -1376,7 +1376,7 @@ xfs_attr_refillstate(xfs_da_state_t *state)
blk->blkno, blk->disk_blkno, blk->blkno, blk->disk_blkno,
&blk->bp, XFS_ATTR_FORK); &blk->bp, XFS_ATTR_FORK);
if (error) if (error)
return(error); return error;
} else { } else {
blk->bp = NULL; blk->bp = NULL;
} }
@ -1395,13 +1395,13 @@ xfs_attr_refillstate(xfs_da_state_t *state)
blk->blkno, blk->disk_blkno, blk->blkno, blk->disk_blkno,
&blk->bp, XFS_ATTR_FORK); &blk->bp, XFS_ATTR_FORK);
if (error) if (error)
return(error); return error;
} else { } else {
blk->bp = NULL; blk->bp = NULL;
} }
} }
return(0); return 0;
} }
/* /*
@ -1455,5 +1455,5 @@ xfs_attr_node_get(xfs_da_args_t *args)
} }
xfs_da_state_free(state); xfs_da_state_free(state);
return(retval); return retval;
} }

View File

@ -76,7 +76,7 @@ xfs_attr3_leaf_freextent(
error = xfs_bmapi_read(dp, (xfs_fileoff_t)tblkno, tblkcnt, error = xfs_bmapi_read(dp, (xfs_fileoff_t)tblkno, tblkcnt,
&map, &nmap, XFS_BMAPI_ATTRFORK); &map, &nmap, XFS_BMAPI_ATTRFORK);
if (error) { if (error) {
return(error); return error;
} }
ASSERT(nmap == 1); ASSERT(nmap == 1);
ASSERT(map.br_startblock != DELAYSTARTBLOCK); ASSERT(map.br_startblock != DELAYSTARTBLOCK);
@ -102,14 +102,14 @@ xfs_attr3_leaf_freextent(
*/ */
error = xfs_trans_roll(trans, dp); error = xfs_trans_roll(trans, dp);
if (error) if (error)
return (error); return error;
} }
tblkno += map.br_blockcount; tblkno += map.br_blockcount;
tblkcnt -= map.br_blockcount; tblkcnt -= map.br_blockcount;
} }
return(0); return 0;
} }
/* /*
@ -256,7 +256,7 @@ xfs_attr3_node_inactive(
error = xfs_da3_node_read(*trans, dp, child_fsb, -2, &child_bp, error = xfs_da3_node_read(*trans, dp, child_fsb, -2, &child_bp,
XFS_ATTR_FORK); XFS_ATTR_FORK);
if (error) if (error)
return(error); return error;
if (child_bp) { if (child_bp) {
/* save for re-read later */ /* save for re-read later */
child_blkno = XFS_BUF_ADDR(child_bp); child_blkno = XFS_BUF_ADDR(child_bp);
@ -414,7 +414,7 @@ xfs_attr_inactive(xfs_inode_t *dp)
error = xfs_trans_reserve(trans, &M_RES(mp)->tr_attrinval, 0, 0); error = xfs_trans_reserve(trans, &M_RES(mp)->tr_attrinval, 0, 0);
if (error) { if (error) {
xfs_trans_cancel(trans, 0); xfs_trans_cancel(trans, 0);
return(error); return error;
} }
xfs_ilock(dp, XFS_ILOCK_EXCL); xfs_ilock(dp, XFS_ILOCK_EXCL);
@ -443,10 +443,10 @@ xfs_attr_inactive(xfs_inode_t *dp)
error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES); error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES);
xfs_iunlock(dp, XFS_ILOCK_EXCL); xfs_iunlock(dp, XFS_ILOCK_EXCL);
return(error); return error;
out: out:
xfs_trans_cancel(trans, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT); xfs_trans_cancel(trans, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
xfs_iunlock(dp, XFS_ILOCK_EXCL); xfs_iunlock(dp, XFS_ILOCK_EXCL);
return(error); return error;
} }

View File

@ -547,7 +547,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
break; break;
} }
if (i == end) if (i == end)
return(XFS_ERROR(ENOATTR)); return XFS_ERROR(ENOATTR);
/* /*
* Fix up the attribute fork data, covering the hole * Fix up the attribute fork data, covering the hole
@ -582,7 +582,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
xfs_sbversion_add_attr2(mp, args->trans); xfs_sbversion_add_attr2(mp, args->trans);
return(0); return 0;
} }
/* /*
@ -611,9 +611,9 @@ xfs_attr_shortform_lookup(xfs_da_args_t *args)
continue; continue;
if (!xfs_attr_namesp_match(args->flags, sfe->flags)) if (!xfs_attr_namesp_match(args->flags, sfe->flags))
continue; continue;
return(XFS_ERROR(EEXIST)); return XFS_ERROR(EEXIST);
} }
return(XFS_ERROR(ENOATTR)); return XFS_ERROR(ENOATTR);
} }
/* /*
@ -640,18 +640,18 @@ xfs_attr_shortform_getvalue(xfs_da_args_t *args)
continue; continue;
if (args->flags & ATTR_KERNOVAL) { if (args->flags & ATTR_KERNOVAL) {
args->valuelen = sfe->valuelen; args->valuelen = sfe->valuelen;
return(XFS_ERROR(EEXIST)); return XFS_ERROR(EEXIST);
} }
if (args->valuelen < sfe->valuelen) { if (args->valuelen < sfe->valuelen) {
args->valuelen = sfe->valuelen; args->valuelen = sfe->valuelen;
return(XFS_ERROR(ERANGE)); return XFS_ERROR(ERANGE);
} }
args->valuelen = sfe->valuelen; args->valuelen = sfe->valuelen;
memcpy(args->value, &sfe->nameval[args->namelen], memcpy(args->value, &sfe->nameval[args->namelen],
args->valuelen); args->valuelen);
return(XFS_ERROR(EEXIST)); return XFS_ERROR(EEXIST);
} }
return(XFS_ERROR(ENOATTR)); return XFS_ERROR(ENOATTR);
} }
/* /*
@ -741,7 +741,7 @@ xfs_attr_shortform_to_leaf(xfs_da_args_t *args)
out: out:
kmem_free(tmpbuffer); kmem_free(tmpbuffer);
return(error); return error;
} }
/* /*
@ -769,12 +769,12 @@ xfs_attr_shortform_allfit(
if (entry->flags & XFS_ATTR_INCOMPLETE) if (entry->flags & XFS_ATTR_INCOMPLETE)
continue; /* don't copy partial entries */ continue; /* don't copy partial entries */
if (!(entry->flags & XFS_ATTR_LOCAL)) if (!(entry->flags & XFS_ATTR_LOCAL))
return(0); return 0;
name_loc = xfs_attr3_leaf_name_local(leaf, i); name_loc = xfs_attr3_leaf_name_local(leaf, i);
if (name_loc->namelen >= XFS_ATTR_SF_ENTSIZE_MAX) if (name_loc->namelen >= XFS_ATTR_SF_ENTSIZE_MAX)
return(0); return 0;
if (be16_to_cpu(name_loc->valuelen) >= XFS_ATTR_SF_ENTSIZE_MAX) if (be16_to_cpu(name_loc->valuelen) >= XFS_ATTR_SF_ENTSIZE_MAX)
return(0); return 0;
bytes += sizeof(struct xfs_attr_sf_entry) - 1 bytes += sizeof(struct xfs_attr_sf_entry) - 1
+ name_loc->namelen + name_loc->namelen
+ be16_to_cpu(name_loc->valuelen); + be16_to_cpu(name_loc->valuelen);
@ -1017,10 +1017,10 @@ xfs_attr3_leaf_split(
ASSERT(oldblk->magic == XFS_ATTR_LEAF_MAGIC); ASSERT(oldblk->magic == XFS_ATTR_LEAF_MAGIC);
error = xfs_da_grow_inode(state->args, &blkno); error = xfs_da_grow_inode(state->args, &blkno);
if (error) if (error)
return(error); return error;
error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp); error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp);
if (error) if (error)
return(error); return error;
newblk->blkno = blkno; newblk->blkno = blkno;
newblk->magic = XFS_ATTR_LEAF_MAGIC; newblk->magic = XFS_ATTR_LEAF_MAGIC;
@ -1031,7 +1031,7 @@ xfs_attr3_leaf_split(
xfs_attr3_leaf_rebalance(state, oldblk, newblk); xfs_attr3_leaf_rebalance(state, oldblk, newblk);
error = xfs_da3_blk_link(state, oldblk, newblk); error = xfs_da3_blk_link(state, oldblk, newblk);
if (error) if (error)
return(error); return error;
/* /*
* Save info on "old" attribute for "atomic rename" ops, leaf_add() * Save info on "old" attribute for "atomic rename" ops, leaf_add()
@ -1053,7 +1053,7 @@ xfs_attr3_leaf_split(
*/ */
oldblk->hashval = xfs_attr_leaf_lasthash(oldblk->bp, NULL); oldblk->hashval = xfs_attr_leaf_lasthash(oldblk->bp, NULL);
newblk->hashval = xfs_attr_leaf_lasthash(newblk->bp, NULL); newblk->hashval = xfs_attr_leaf_lasthash(newblk->bp, NULL);
return(error); return error;
} }
/* /*
@ -1692,7 +1692,7 @@ xfs_attr3_leaf_toosmall(
ichdr.usedbytes; ichdr.usedbytes;
if (bytes > (state->args->geo->blksize >> 1)) { if (bytes > (state->args->geo->blksize >> 1)) {
*action = 0; /* blk over 50%, don't try to join */ *action = 0; /* blk over 50%, don't try to join */
return(0); return 0;
} }
/* /*
@ -1711,7 +1711,7 @@ xfs_attr3_leaf_toosmall(
error = xfs_da3_path_shift(state, &state->altpath, forward, error = xfs_da3_path_shift(state, &state->altpath, forward,
0, &retval); 0, &retval);
if (error) if (error)
return(error); return error;
if (retval) { if (retval) {
*action = 0; *action = 0;
} else { } else {
@ -1740,7 +1740,7 @@ xfs_attr3_leaf_toosmall(
error = xfs_attr3_leaf_read(state->args->trans, state->args->dp, error = xfs_attr3_leaf_read(state->args->trans, state->args->dp,
blkno, -1, &bp); blkno, -1, &bp);
if (error) if (error)
return(error); return error;
xfs_attr3_leaf_hdr_from_disk(&ichdr2, bp->b_addr); xfs_attr3_leaf_hdr_from_disk(&ichdr2, bp->b_addr);
@ -1757,7 +1757,7 @@ xfs_attr3_leaf_toosmall(
} }
if (i >= 2) { if (i >= 2) {
*action = 0; *action = 0;
return(0); return 0;
} }
/* /*
@ -1773,13 +1773,13 @@ xfs_attr3_leaf_toosmall(
0, &retval); 0, &retval);
} }
if (error) if (error)
return(error); return error;
if (retval) { if (retval) {
*action = 0; *action = 0;
} else { } else {
*action = 1; *action = 1;
} }
return(0); return 0;
} }
/* /*
@ -2481,7 +2481,7 @@ xfs_attr3_leaf_clearflag(
*/ */
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
if (error) if (error)
return(error); return error;
leaf = bp->b_addr; leaf = bp->b_addr;
entry = &xfs_attr3_leaf_entryp(leaf)[args->index]; entry = &xfs_attr3_leaf_entryp(leaf)[args->index];
@ -2548,7 +2548,7 @@ xfs_attr3_leaf_setflag(
*/ */
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
if (error) if (error)
return(error); return error;
leaf = bp->b_addr; leaf = bp->b_addr;
#ifdef DEBUG #ifdef DEBUG

View File

@ -50,11 +50,11 @@ xfs_attr_shortform_compare(const void *a, const void *b)
sa = (xfs_attr_sf_sort_t *)a; sa = (xfs_attr_sf_sort_t *)a;
sb = (xfs_attr_sf_sort_t *)b; sb = (xfs_attr_sf_sort_t *)b;
if (sa->hash < sb->hash) { if (sa->hash < sb->hash) {
return(-1); return -1;
} else if (sa->hash > sb->hash) { } else if (sa->hash > sb->hash) {
return(1); return 1;
} else { } else {
return(sa->entno - sb->entno); return sa->entno - sb->entno;
} }
} }
@ -86,7 +86,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
sf = (xfs_attr_shortform_t *)dp->i_afp->if_u1.if_data; sf = (xfs_attr_shortform_t *)dp->i_afp->if_u1.if_data;
ASSERT(sf != NULL); ASSERT(sf != NULL);
if (!sf->hdr.count) if (!sf->hdr.count)
return(0); return 0;
cursor = context->cursor; cursor = context->cursor;
ASSERT(cursor != NULL); ASSERT(cursor != NULL);
@ -124,7 +124,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
sfe = XFS_ATTR_SF_NEXTENTRY(sfe); sfe = XFS_ATTR_SF_NEXTENTRY(sfe);
} }
trace_xfs_attr_list_sf_all(context); trace_xfs_attr_list_sf_all(context);
return(0); return 0;
} }
/* do no more for a search callback */ /* do no more for a search callback */
@ -188,7 +188,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
} }
if (i == nsbuf) { if (i == nsbuf) {
kmem_free(sbuf); kmem_free(sbuf);
return(0); return 0;
} }
/* /*
@ -213,7 +213,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
} }
kmem_free(sbuf); kmem_free(sbuf);
return(0); return 0;
} }
STATIC int STATIC int
@ -244,7 +244,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
error = xfs_da3_node_read(NULL, dp, cursor->blkno, -1, error = xfs_da3_node_read(NULL, dp, cursor->blkno, -1,
&bp, XFS_ATTR_FORK); &bp, XFS_ATTR_FORK);
if ((error != 0) && (error != EFSCORRUPTED)) if ((error != 0) && (error != EFSCORRUPTED))
return(error); return error;
if (bp) { if (bp) {
struct xfs_attr_leaf_entry *entries; struct xfs_attr_leaf_entry *entries;
@ -295,7 +295,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
cursor->blkno, -1, &bp, cursor->blkno, -1, &bp,
XFS_ATTR_FORK); XFS_ATTR_FORK);
if (error) if (error)
return(error); return error;
node = bp->b_addr; node = bp->b_addr;
magic = be16_to_cpu(node->hdr.info.magic); magic = be16_to_cpu(node->hdr.info.magic);
if (magic == XFS_ATTR_LEAF_MAGIC || if (magic == XFS_ATTR_LEAF_MAGIC ||
@ -616,7 +616,7 @@ xfs_attr_list(
* Validate the cursor. * Validate the cursor.
*/ */
if (cursor->pad1 || cursor->pad2) if (cursor->pad1 || cursor->pad2)
return(XFS_ERROR(EINVAL)); return XFS_ERROR(EINVAL);
if ((cursor->initted == 0) && if ((cursor->initted == 0) &&
(cursor->hashval || cursor->blkno || cursor->offset)) (cursor->hashval || cursor->blkno || cursor->offset))
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);

View File

@ -452,7 +452,7 @@ xfs_attr_rmtval_set(
ASSERT(committed); ASSERT(committed);
args->trans = NULL; args->trans = NULL;
xfs_bmap_cancel(args->flist); xfs_bmap_cancel(args->flist);
return(error); return error;
} }
/* /*
@ -473,7 +473,7 @@ xfs_attr_rmtval_set(
*/ */
error = xfs_trans_roll(&args->trans, dp); error = xfs_trans_roll(&args->trans, dp);
if (error) if (error)
return (error); return error;
} }
/* /*
@ -498,7 +498,7 @@ xfs_attr_rmtval_set(
blkcnt, &map, &nmap, blkcnt, &map, &nmap,
XFS_BMAPI_ATTRFORK); XFS_BMAPI_ATTRFORK);
if (error) if (error)
return(error); return error;
ASSERT(nmap == 1); ASSERT(nmap == 1);
ASSERT((map.br_startblock != DELAYSTARTBLOCK) && ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
(map.br_startblock != HOLESTARTBLOCK)); (map.br_startblock != HOLESTARTBLOCK));
@ -563,7 +563,7 @@ xfs_attr_rmtval_remove(
error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno, error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno,
blkcnt, &map, &nmap, XFS_BMAPI_ATTRFORK); blkcnt, &map, &nmap, XFS_BMAPI_ATTRFORK);
if (error) if (error)
return(error); return error;
ASSERT(nmap == 1); ASSERT(nmap == 1);
ASSERT((map.br_startblock != DELAYSTARTBLOCK) && ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
(map.br_startblock != HOLESTARTBLOCK)); (map.br_startblock != HOLESTARTBLOCK));
@ -622,7 +622,7 @@ xfs_attr_rmtval_remove(
*/ */
error = xfs_trans_roll(&args->trans, args->dp); error = xfs_trans_roll(&args->trans, args->dp);
if (error) if (error)
return (error); return error;
} }
return(0); return 0;
} }

View File

@ -315,7 +315,7 @@ xfs_da3_node_create(
error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork); error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork);
if (error) if (error)
return(error); return error;
bp->b_ops = &xfs_da3_node_buf_ops; bp->b_ops = &xfs_da3_node_buf_ops;
xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF); xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF);
node = bp->b_addr; node = bp->b_addr;
@ -337,7 +337,7 @@ xfs_da3_node_create(
XFS_DA_LOGRANGE(node, &node->hdr, dp->d_ops->node_hdr_size)); XFS_DA_LOGRANGE(node, &node->hdr, dp->d_ops->node_hdr_size));
*bpp = bp; *bpp = bp;
return(0); return 0;
} }
/* /*
@ -386,7 +386,7 @@ xfs_da3_split(
case XFS_ATTR_LEAF_MAGIC: case XFS_ATTR_LEAF_MAGIC:
error = xfs_attr3_leaf_split(state, oldblk, newblk); error = xfs_attr3_leaf_split(state, oldblk, newblk);
if ((error != 0) && (error != ENOSPC)) { if ((error != 0) && (error != ENOSPC)) {
return(error); /* GROT: attr is inconsistent */ return error; /* GROT: attr is inconsistent */
} }
if (!error) { if (!error) {
addblk = newblk; addblk = newblk;
@ -408,7 +408,7 @@ xfs_da3_split(
&state->extrablk); &state->extrablk);
} }
if (error) if (error)
return(error); /* GROT: attr inconsistent */ return error; /* GROT: attr inconsistent */
addblk = newblk; addblk = newblk;
break; break;
case XFS_DIR2_LEAFN_MAGIC: case XFS_DIR2_LEAFN_MAGIC:
@ -422,7 +422,7 @@ xfs_da3_split(
max - i, &action); max - i, &action);
addblk->bp = NULL; addblk->bp = NULL;
if (error) if (error)
return(error); /* GROT: dir is inconsistent */ return error; /* GROT: dir is inconsistent */
/* /*
* Record the newly split block for the next time thru? * Record the newly split block for the next time thru?
*/ */
@ -439,7 +439,7 @@ xfs_da3_split(
xfs_da3_fixhashpath(state, &state->path); xfs_da3_fixhashpath(state, &state->path);
} }
if (!addblk) if (!addblk)
return(0); return 0;
/* /*
* Split the root node. * Split the root node.
@ -449,7 +449,7 @@ xfs_da3_split(
error = xfs_da3_root_split(state, oldblk, addblk); error = xfs_da3_root_split(state, oldblk, addblk);
if (error) { if (error) {
addblk->bp = NULL; addblk->bp = NULL;
return(error); /* GROT: dir is inconsistent */ return error; /* GROT: dir is inconsistent */
} }
/* /*
@ -492,7 +492,7 @@ xfs_da3_split(
sizeof(node->hdr.info))); sizeof(node->hdr.info)));
} }
addblk->bp = NULL; addblk->bp = NULL;
return(0); return 0;
} }
/* /*
@ -670,18 +670,18 @@ xfs_da3_node_split(
*/ */
error = xfs_da_grow_inode(state->args, &blkno); error = xfs_da_grow_inode(state->args, &blkno);
if (error) if (error)
return(error); /* GROT: dir is inconsistent */ return error; /* GROT: dir is inconsistent */
error = xfs_da3_node_create(state->args, blkno, treelevel, error = xfs_da3_node_create(state->args, blkno, treelevel,
&newblk->bp, state->args->whichfork); &newblk->bp, state->args->whichfork);
if (error) if (error)
return(error); /* GROT: dir is inconsistent */ return error; /* GROT: dir is inconsistent */
newblk->blkno = blkno; newblk->blkno = blkno;
newblk->magic = XFS_DA_NODE_MAGIC; newblk->magic = XFS_DA_NODE_MAGIC;
xfs_da3_node_rebalance(state, oldblk, newblk); xfs_da3_node_rebalance(state, oldblk, newblk);
error = xfs_da3_blk_link(state, oldblk, newblk); error = xfs_da3_blk_link(state, oldblk, newblk);
if (error) if (error)
return(error); return error;
*result = 1; *result = 1;
} else { } else {
*result = 0; *result = 0;
@ -721,7 +721,7 @@ xfs_da3_node_split(
} }
} }
return(0); return 0;
} }
/* /*
@ -963,9 +963,9 @@ xfs_da3_join(
case XFS_ATTR_LEAF_MAGIC: case XFS_ATTR_LEAF_MAGIC:
error = xfs_attr3_leaf_toosmall(state, &action); error = xfs_attr3_leaf_toosmall(state, &action);
if (error) if (error)
return(error); return error;
if (action == 0) if (action == 0)
return(0); return 0;
xfs_attr3_leaf_unbalance(state, drop_blk, save_blk); xfs_attr3_leaf_unbalance(state, drop_blk, save_blk);
break; break;
case XFS_DIR2_LEAFN_MAGIC: case XFS_DIR2_LEAFN_MAGIC:
@ -985,7 +985,7 @@ xfs_da3_join(
xfs_da3_fixhashpath(state, &state->path); xfs_da3_fixhashpath(state, &state->path);
error = xfs_da3_node_toosmall(state, &action); error = xfs_da3_node_toosmall(state, &action);
if (error) if (error)
return(error); return error;
if (action == 0) if (action == 0)
return 0; return 0;
xfs_da3_node_unbalance(state, drop_blk, save_blk); xfs_da3_node_unbalance(state, drop_blk, save_blk);
@ -995,12 +995,12 @@ xfs_da3_join(
error = xfs_da3_blk_unlink(state, drop_blk, save_blk); error = xfs_da3_blk_unlink(state, drop_blk, save_blk);
xfs_da_state_kill_altpath(state); xfs_da_state_kill_altpath(state);
if (error) if (error)
return(error); return error;
error = xfs_da_shrink_inode(state->args, drop_blk->blkno, error = xfs_da_shrink_inode(state->args, drop_blk->blkno,
drop_blk->bp); drop_blk->bp);
drop_blk->bp = NULL; drop_blk->bp = NULL;
if (error) if (error)
return(error); return error;
} }
/* /*
* We joined all the way to the top. If it turns out that * We joined all the way to the top. If it turns out that
@ -1010,7 +1010,7 @@ xfs_da3_join(
xfs_da3_node_remove(state, drop_blk); xfs_da3_node_remove(state, drop_blk);
xfs_da3_fixhashpath(state, &state->path); xfs_da3_fixhashpath(state, &state->path);
error = xfs_da3_root_join(state, &state->path.blk[0]); error = xfs_da3_root_join(state, &state->path.blk[0]);
return(error); return error;
} }
#ifdef DEBUG #ifdef DEBUG
@ -1099,7 +1099,7 @@ xfs_da3_root_join(
xfs_trans_log_buf(args->trans, root_blk->bp, 0, xfs_trans_log_buf(args->trans, root_blk->bp, 0,
args->geo->blksize - 1); args->geo->blksize - 1);
error = xfs_da_shrink_inode(args, child, bp); error = xfs_da_shrink_inode(args, child, bp);
return(error); return error;
} }
/* /*
@ -1142,7 +1142,7 @@ xfs_da3_node_toosmall(
dp->d_ops->node_hdr_from_disk(&nodehdr, node); dp->d_ops->node_hdr_from_disk(&nodehdr, node);
if (nodehdr.count > (state->args->geo->node_ents >> 1)) { if (nodehdr.count > (state->args->geo->node_ents >> 1)) {
*action = 0; /* blk over 50%, don't try to join */ *action = 0; /* blk over 50%, don't try to join */
return(0); /* blk over 50%, don't try to join */ return 0; /* blk over 50%, don't try to join */
} }
/* /*
@ -1161,13 +1161,13 @@ xfs_da3_node_toosmall(
error = xfs_da3_path_shift(state, &state->altpath, forward, error = xfs_da3_path_shift(state, &state->altpath, forward,
0, &retval); 0, &retval);
if (error) if (error)
return(error); return error;
if (retval) { if (retval) {
*action = 0; *action = 0;
} else { } else {
*action = 2; *action = 2;
} }
return(0); return 0;
} }
/* /*
@ -1194,7 +1194,7 @@ xfs_da3_node_toosmall(
error = xfs_da3_node_read(state->args->trans, dp, error = xfs_da3_node_read(state->args->trans, dp,
blkno, -1, &bp, state->args->whichfork); blkno, -1, &bp, state->args->whichfork);
if (error) if (error)
return(error); return error;
node = bp->b_addr; node = bp->b_addr;
dp->d_ops->node_hdr_from_disk(&thdr, node); dp->d_ops->node_hdr_from_disk(&thdr, node);
@ -1486,7 +1486,7 @@ xfs_da3_node_lookup_int(
if (error) { if (error) {
blk->blkno = 0; blk->blkno = 0;
state->path.active--; state->path.active--;
return(error); return error;
} }
curr = blk->bp->b_addr; curr = blk->bp->b_addr;
blk->magic = be16_to_cpu(curr->magic); blk->magic = be16_to_cpu(curr->magic);
@ -1586,7 +1586,7 @@ xfs_da3_node_lookup_int(
error = xfs_da3_path_shift(state, &state->path, 1, 1, error = xfs_da3_path_shift(state, &state->path, 1, 1,
&retval); &retval);
if (error) if (error)
return(error); return error;
if (retval == 0) { if (retval == 0) {
continue; continue;
} else if (blk->magic == XFS_ATTR_LEAF_MAGIC) { } else if (blk->magic == XFS_ATTR_LEAF_MAGIC) {
@ -1597,7 +1597,7 @@ xfs_da3_node_lookup_int(
break; break;
} }
*result = retval; *result = retval;
return(0); return 0;
} }
/*======================================================================== /*========================================================================
@ -1692,7 +1692,7 @@ xfs_da3_blk_link(
be32_to_cpu(old_info->back), be32_to_cpu(old_info->back),
-1, &bp, args->whichfork); -1, &bp, args->whichfork);
if (error) if (error)
return(error); return error;
ASSERT(bp != NULL); ASSERT(bp != NULL);
tmp_info = bp->b_addr; tmp_info = bp->b_addr;
ASSERT(tmp_info->magic == old_info->magic); ASSERT(tmp_info->magic == old_info->magic);
@ -1713,7 +1713,7 @@ xfs_da3_blk_link(
be32_to_cpu(old_info->forw), be32_to_cpu(old_info->forw),
-1, &bp, args->whichfork); -1, &bp, args->whichfork);
if (error) if (error)
return(error); return error;
ASSERT(bp != NULL); ASSERT(bp != NULL);
tmp_info = bp->b_addr; tmp_info = bp->b_addr;
ASSERT(tmp_info->magic == old_info->magic); ASSERT(tmp_info->magic == old_info->magic);
@ -1726,7 +1726,7 @@ xfs_da3_blk_link(
xfs_trans_log_buf(args->trans, old_blk->bp, 0, sizeof(*tmp_info) - 1); xfs_trans_log_buf(args->trans, old_blk->bp, 0, sizeof(*tmp_info) - 1);
xfs_trans_log_buf(args->trans, new_blk->bp, 0, sizeof(*tmp_info) - 1); xfs_trans_log_buf(args->trans, new_blk->bp, 0, sizeof(*tmp_info) - 1);
return(0); return 0;
} }
/* /*
@ -1772,7 +1772,7 @@ xfs_da3_blk_unlink(
be32_to_cpu(drop_info->back), be32_to_cpu(drop_info->back),
-1, &bp, args->whichfork); -1, &bp, args->whichfork);
if (error) if (error)
return(error); return error;
ASSERT(bp != NULL); ASSERT(bp != NULL);
tmp_info = bp->b_addr; tmp_info = bp->b_addr;
ASSERT(tmp_info->magic == save_info->magic); ASSERT(tmp_info->magic == save_info->magic);
@ -1789,7 +1789,7 @@ xfs_da3_blk_unlink(
be32_to_cpu(drop_info->forw), be32_to_cpu(drop_info->forw),
-1, &bp, args->whichfork); -1, &bp, args->whichfork);
if (error) if (error)
return(error); return error;
ASSERT(bp != NULL); ASSERT(bp != NULL);
tmp_info = bp->b_addr; tmp_info = bp->b_addr;
ASSERT(tmp_info->magic == save_info->magic); ASSERT(tmp_info->magic == save_info->magic);
@ -1801,7 +1801,7 @@ xfs_da3_blk_unlink(
} }
xfs_trans_log_buf(args->trans, save_blk->bp, 0, sizeof(*save_info) - 1); xfs_trans_log_buf(args->trans, save_blk->bp, 0, sizeof(*save_info) - 1);
return(0); return 0;
} }
/* /*
@ -1861,7 +1861,7 @@ xfs_da3_path_shift(
if (level < 0) { if (level < 0) {
*result = XFS_ERROR(ENOENT); /* we're out of our tree */ *result = XFS_ERROR(ENOENT); /* we're out of our tree */
ASSERT(args->op_flags & XFS_DA_OP_OKNOENT); ASSERT(args->op_flags & XFS_DA_OP_OKNOENT);
return(0); return 0;
} }
/* /*
@ -1883,7 +1883,7 @@ xfs_da3_path_shift(
error = xfs_da3_node_read(args->trans, dp, blkno, -1, error = xfs_da3_node_read(args->trans, dp, blkno, -1,
&blk->bp, args->whichfork); &blk->bp, args->whichfork);
if (error) if (error)
return(error); return error;
info = blk->bp->b_addr; info = blk->bp->b_addr;
ASSERT(info->magic == cpu_to_be16(XFS_DA_NODE_MAGIC) || ASSERT(info->magic == cpu_to_be16(XFS_DA_NODE_MAGIC) ||
info->magic == cpu_to_be16(XFS_DA3_NODE_MAGIC) || info->magic == cpu_to_be16(XFS_DA3_NODE_MAGIC) ||

View File

@ -327,7 +327,7 @@ xfs_qm_dqalloc(
*/ */
if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) { if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
xfs_iunlock(quotip, XFS_ILOCK_EXCL); xfs_iunlock(quotip, XFS_ILOCK_EXCL);
return (ESRCH); return ESRCH;
} }
xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
@ -400,7 +400,7 @@ xfs_qm_dqalloc(
error0: error0:
xfs_iunlock(quotip, XFS_ILOCK_EXCL); xfs_iunlock(quotip, XFS_ILOCK_EXCL);
return (error); return error;
} }
STATIC int STATIC int
@ -547,7 +547,7 @@ xfs_qm_dqtobp(
*O_bpp = bp; *O_bpp = bp;
*O_ddpp = bp->b_addr + dqp->q_bufoffset; *O_ddpp = bp->b_addr + dqp->q_bufoffset;
return (0); return 0;
} }
@ -715,7 +715,7 @@ xfs_qm_dqget(
if ((! XFS_IS_UQUOTA_ON(mp) && type == XFS_DQ_USER) || if ((! XFS_IS_UQUOTA_ON(mp) && type == XFS_DQ_USER) ||
(! XFS_IS_PQUOTA_ON(mp) && type == XFS_DQ_PROJ) || (! XFS_IS_PQUOTA_ON(mp) && type == XFS_DQ_PROJ) ||
(! XFS_IS_GQUOTA_ON(mp) && type == XFS_DQ_GROUP)) { (! XFS_IS_GQUOTA_ON(mp) && type == XFS_DQ_GROUP)) {
return (ESRCH); return ESRCH;
} }
#ifdef DEBUG #ifdef DEBUG
@ -723,7 +723,7 @@ xfs_qm_dqget(
if ((xfs_dqerror_target == mp->m_ddev_targp) && if ((xfs_dqerror_target == mp->m_ddev_targp) &&
(xfs_dqreq_num++ % xfs_dqerror_mod) == 0) { (xfs_dqreq_num++ % xfs_dqerror_mod) == 0) {
xfs_debug(mp, "Returning error in dqget"); xfs_debug(mp, "Returning error in dqget");
return (EIO); return EIO;
} }
} }
@ -829,7 +829,7 @@ restart:
ASSERT((ip == NULL) || xfs_isilocked(ip, XFS_ILOCK_EXCL)); ASSERT((ip == NULL) || xfs_isilocked(ip, XFS_ILOCK_EXCL));
trace_xfs_dqget_miss(dqp); trace_xfs_dqget_miss(dqp);
*O_dqpp = dqp; *O_dqpp = dqp;
return (0); return 0;
} }
/* /*

View File

@ -1692,7 +1692,7 @@ xfs_iext_idx_to_irec(
} }
*idxp = page_idx; *idxp = page_idx;
*erp_idxp = erp_idx; *erp_idxp = erp_idx;
return(erp); return erp;
} }
/* /*

View File

@ -331,7 +331,7 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y)
{ {
x += y - 1; x += y - 1;
do_div(x, y); do_div(x, y);
return(x * y); return x * y;
} }
static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)

View File

@ -2946,7 +2946,7 @@ xlog_recover_quotaoff_pass1(
if (qoff_f->qf_flags & XFS_GQUOTA_ACCT) if (qoff_f->qf_flags & XFS_GQUOTA_ACCT)
log->l_quotaoffs_flag |= XFS_DQ_GROUP; log->l_quotaoffs_flag |= XFS_DQ_GROUP;
return (0); return 0;
} }
/* /*
@ -2971,7 +2971,7 @@ xlog_recover_dquot_pass2(
* Filesystems are required to send in quota flags at mount time. * Filesystems are required to send in quota flags at mount time.
*/ */
if (mp->m_qflags == 0) if (mp->m_qflags == 0)
return (0); return 0;
recddq = item->ri_buf[1].i_addr; recddq = item->ri_buf[1].i_addr;
if (recddq == NULL) { if (recddq == NULL) {
@ -2990,7 +2990,7 @@ xlog_recover_dquot_pass2(
type = recddq->d_flags & (XFS_DQ_USER | XFS_DQ_PROJ | XFS_DQ_GROUP); type = recddq->d_flags & (XFS_DQ_USER | XFS_DQ_PROJ | XFS_DQ_GROUP);
ASSERT(type); ASSERT(type);
if (log->l_quotaoffs_flag & type) if (log->l_quotaoffs_flag & type)
return (0); return 0;
/* /*
* At this point we know that quota was _not_ turned off. * At this point we know that quota was _not_ turned off.
@ -3560,7 +3560,7 @@ xlog_recover_process_data(
/* check the log format matches our own - else we can't recover */ /* check the log format matches our own - else we can't recover */
if (xlog_header_check_recover(log->l_mp, rhead)) if (xlog_header_check_recover(log->l_mp, rhead))
return (XFS_ERROR(EIO)); return XFS_ERROR(EIO);
while ((dp < lp) && num_logops) { while ((dp < lp) && num_logops) {
ASSERT(dp + sizeof(xlog_op_header_t) <= lp); ASSERT(dp + sizeof(xlog_op_header_t) <= lp);
@ -3571,7 +3571,7 @@ xlog_recover_process_data(
xfs_warn(log->l_mp, "%s: bad clientid 0x%x", xfs_warn(log->l_mp, "%s: bad clientid 0x%x",
__func__, ohead->oh_clientid); __func__, ohead->oh_clientid);
ASSERT(0); ASSERT(0);
return (XFS_ERROR(EIO)); return XFS_ERROR(EIO);
} }
tid = be32_to_cpu(ohead->oh_tid); tid = be32_to_cpu(ohead->oh_tid);
hash = XLOG_RHASH(tid); hash = XLOG_RHASH(tid);
@ -3585,7 +3585,7 @@ xlog_recover_process_data(
xfs_warn(log->l_mp, "%s: bad length 0x%x", xfs_warn(log->l_mp, "%s: bad length 0x%x",
__func__, be32_to_cpu(ohead->oh_len)); __func__, be32_to_cpu(ohead->oh_len));
WARN_ON(1); WARN_ON(1);
return (XFS_ERROR(EIO)); return XFS_ERROR(EIO);
} }
flags = ohead->oh_flags & ~XLOG_END_TRANS; flags = ohead->oh_flags & ~XLOG_END_TRANS;
if (flags & XLOG_WAS_CONT_TRANS) if (flags & XLOG_WAS_CONT_TRANS)
@ -4388,7 +4388,7 @@ xlog_do_recover(
* If IO errors happened during recovery, bail out. * If IO errors happened during recovery, bail out.
*/ */
if (XFS_FORCED_SHUTDOWN(log->l_mp)) { if (XFS_FORCED_SHUTDOWN(log->l_mp)) {
return (EIO); return EIO;
} }
/* /*

View File

@ -1463,7 +1463,7 @@ xfs_qm_quotacheck(
} }
} else } else
xfs_notice(mp, "Quotacheck: Done."); xfs_notice(mp, "Quotacheck: Done.");
return (error); return error;
} }
/* /*
@ -1895,7 +1895,7 @@ xfs_qm_vop_chown_reserve(
-((xfs_qcnt_t)delblks), 0, blkflags); -((xfs_qcnt_t)delblks), 0, blkflags);
} }
return (0); return 0;
} }
int int

View File

@ -94,7 +94,7 @@ xfs_qm_scall_quotaoff(
/* XXX what to do if error ? Revert back to old vals incore ? */ /* XXX what to do if error ? Revert back to old vals incore ? */
error = xfs_qm_write_sb_changes(mp, XFS_SB_QFLAGS); error = xfs_qm_write_sb_changes(mp, XFS_SB_QFLAGS);
return (error); return error;
} }
dqtype = 0; dqtype = 0;
@ -198,7 +198,7 @@ xfs_qm_scall_quotaoff(
if (mp->m_qflags == 0) { if (mp->m_qflags == 0) {
mutex_unlock(&q->qi_quotaofflock); mutex_unlock(&q->qi_quotaofflock);
xfs_qm_destroy_quotainfo(mp); xfs_qm_destroy_quotainfo(mp);
return (0); return 0;
} }
/* /*
@ -376,7 +376,7 @@ xfs_qm_scall_quotaon(
sbflags |= XFS_SB_QFLAGS; sbflags |= XFS_SB_QFLAGS;
if ((error = xfs_qm_write_sb_changes(mp, sbflags))) if ((error = xfs_qm_write_sb_changes(mp, sbflags)))
return (error); return error;
/* /*
* If we aren't trying to switch on quota enforcement, we are done. * If we aren't trying to switch on quota enforcement, we are done.
*/ */
@ -387,7 +387,7 @@ xfs_qm_scall_quotaon(
((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) != ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) !=
(mp->m_qflags & XFS_GQUOTA_ACCT)) || (mp->m_qflags & XFS_GQUOTA_ACCT)) ||
(flags & XFS_ALL_QUOTA_ENFD) == 0) (flags & XFS_ALL_QUOTA_ENFD) == 0)
return (0); return 0;
if (! XFS_IS_QUOTA_RUNNING(mp)) if (! XFS_IS_QUOTA_RUNNING(mp))
return XFS_ERROR(ESRCH); return XFS_ERROR(ESRCH);
@ -399,7 +399,7 @@ xfs_qm_scall_quotaon(
mp->m_qflags |= (flags & XFS_ALL_QUOTA_ENFD); mp->m_qflags |= (flags & XFS_ALL_QUOTA_ENFD);
mutex_unlock(&mp->m_quotainfo->qi_quotaofflock); mutex_unlock(&mp->m_quotainfo->qi_quotaofflock);
return (0); return 0;
} }
@ -426,7 +426,7 @@ xfs_qm_scall_getqstat(
if (!xfs_sb_version_hasquota(&mp->m_sb)) { if (!xfs_sb_version_hasquota(&mp->m_sb)) {
out->qs_uquota.qfs_ino = NULLFSINO; out->qs_uquota.qfs_ino = NULLFSINO;
out->qs_gquota.qfs_ino = NULLFSINO; out->qs_gquota.qfs_ino = NULLFSINO;
return (0); return 0;
} }
out->qs_flags = (__uint16_t) xfs_qm_export_flags(mp->m_qflags & out->qs_flags = (__uint16_t) xfs_qm_export_flags(mp->m_qflags &
@ -514,7 +514,7 @@ xfs_qm_scall_getqstatv(
out->qs_uquota.qfs_ino = NULLFSINO; out->qs_uquota.qfs_ino = NULLFSINO;
out->qs_gquota.qfs_ino = NULLFSINO; out->qs_gquota.qfs_ino = NULLFSINO;
out->qs_pquota.qfs_ino = NULLFSINO; out->qs_pquota.qfs_ino = NULLFSINO;
return (0); return 0;
} }
out->qs_flags = (__uint16_t) xfs_qm_export_flags(mp->m_qflags & out->qs_flags = (__uint16_t) xfs_qm_export_flags(mp->m_qflags &
@ -758,7 +758,7 @@ xfs_qm_log_quotaoff_end(
error = xfs_trans_reserve(tp, &M_RES(mp)->tr_qm_equotaoff, 0, 0); error = xfs_trans_reserve(tp, &M_RES(mp)->tr_qm_equotaoff, 0, 0);
if (error) { if (error) {
xfs_trans_cancel(tp, 0); xfs_trans_cancel(tp, 0);
return (error); return error;
} }
qoffi = xfs_trans_get_qoff_item(tp, startqoff, qoffi = xfs_trans_get_qoff_item(tp, startqoff,
@ -772,7 +772,7 @@ xfs_qm_log_quotaoff_end(
*/ */
xfs_trans_set_sync(tp); xfs_trans_set_sync(tp);
error = xfs_trans_commit(tp, 0); error = xfs_trans_commit(tp, 0);
return (error); return error;
} }
@ -822,7 +822,7 @@ error0:
spin_unlock(&mp->m_sb_lock); spin_unlock(&mp->m_sb_lock);
} }
*qoffstartp = qoffi; *qoffstartp = qoffi;
return (error); return error;
} }
@ -953,7 +953,7 @@ xfs_qm_export_flags(
uflags |= FS_QUOTA_GDQ_ENFD; uflags |= FS_QUOTA_GDQ_ENFD;
if (flags & XFS_PQUOTA_ENFD) if (flags & XFS_PQUOTA_ENFD)
uflags |= FS_QUOTA_PDQ_ENFD; uflags |= FS_QUOTA_PDQ_ENFD;
return (uflags); return uflags;
} }

View File

@ -190,7 +190,7 @@ xfs_trans_reserve(
-((int64_t)blocks), rsvd); -((int64_t)blocks), rsvd);
if (error != 0) { if (error != 0) {
current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
return (XFS_ERROR(ENOSPC)); return XFS_ERROR(ENOSPC);
} }
tp->t_blk_res += blocks; tp->t_blk_res += blocks;
} }
@ -1024,7 +1024,7 @@ xfs_trans_roll(
*/ */
error = xfs_trans_commit(trans, 0); error = xfs_trans_commit(trans, 0);
if (error) if (error)
return (error); return error;
trans = *tpp; trans = *tpp;

View File

@ -166,7 +166,7 @@ xfs_trans_get_buf_map(
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
bip->bli_recur++; bip->bli_recur++;
trace_xfs_trans_get_buf_recur(bip); trace_xfs_trans_get_buf_recur(bip);
return (bp); return bp;
} }
bp = xfs_buf_get_map(target, map, nmaps, flags); bp = xfs_buf_get_map(target, map, nmaps, flags);
@ -178,7 +178,7 @@ xfs_trans_get_buf_map(
_xfs_trans_bjoin(tp, bp, 1); _xfs_trans_bjoin(tp, bp, 1);
trace_xfs_trans_get_buf(bp->b_fspriv); trace_xfs_trans_get_buf(bp->b_fspriv);
return (bp); return bp;
} }
/* /*
@ -201,9 +201,8 @@ xfs_trans_getsb(xfs_trans_t *tp,
* Default to just trying to lock the superblock buffer * Default to just trying to lock the superblock buffer
* if tp is NULL. * if tp is NULL.
*/ */
if (tp == NULL) { if (tp == NULL)
return (xfs_getsb(mp, flags)); return xfs_getsb(mp, flags);
}
/* /*
* If the superblock buffer already has this transaction * If the superblock buffer already has this transaction
@ -218,7 +217,7 @@ xfs_trans_getsb(xfs_trans_t *tp,
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
bip->bli_recur++; bip->bli_recur++;
trace_xfs_trans_getsb_recur(bip); trace_xfs_trans_getsb_recur(bip);
return (bp); return bp;
} }
bp = xfs_getsb(mp, flags); bp = xfs_getsb(mp, flags);
@ -227,7 +226,7 @@ xfs_trans_getsb(xfs_trans_t *tp,
_xfs_trans_bjoin(tp, bp, 1); _xfs_trans_bjoin(tp, bp, 1);
trace_xfs_trans_getsb(bp->b_fspriv); trace_xfs_trans_getsb(bp->b_fspriv);
return (bp); return bp;
} }
#ifdef DEBUG #ifdef DEBUG