aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Farina <tfarina@chromium.org>2012-11-12 18:32:59 -0500
committerBen Myers <bpm@sgi.com>2013-01-17 18:32:57 -0500
commit667a9291c5b38318a47a2df730bc064e5d37d2a8 (patch)
tree18c7478fa6f13c2a8e0f1951d56ce9d32e15ee71
parentaeb4f20a02b4c984c48995ad54f40caf5ffa0705 (diff)
xfs: Remove boolean_t typedef completely.
Since we are using C99 we have one builtin defined in include/linux/types.h, use that instead. v2: you missed one in fs/xfs/xfs_qm_bhv.c, cleaned up. -bpm Signed-off-by: Thiago Farina <tfarina@chromium.org> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r--fs/xfs/xfs_log.c8
-rw-r--r--fs/xfs/xfs_qm_bhv.c2
-rw-r--r--fs/xfs/xfs_qm_syscalls.c8
-rw-r--r--fs/xfs/xfs_trans_dquot.c10
-rw-r--r--fs/xfs/xfs_types.h1
-rw-r--r--fs/xfs/xfs_vnodeops.c12
6 files changed, 20 insertions, 21 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 46bd9d52ab51..dafdae36f2fb 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -120,7 +120,7 @@ xlog_verify_iclog(
120 struct xlog *log, 120 struct xlog *log,
121 struct xlog_in_core *iclog, 121 struct xlog_in_core *iclog,
122 int count, 122 int count,
123 boolean_t syncing); 123 bool syncing);
124STATIC void 124STATIC void
125xlog_verify_tail_lsn( 125xlog_verify_tail_lsn(
126 struct xlog *log, 126 struct xlog *log,
@@ -3611,7 +3611,7 @@ xlog_verify_iclog(
3611 struct xlog *log, 3611 struct xlog *log,
3612 struct xlog_in_core *iclog, 3612 struct xlog_in_core *iclog,
3613 int count, 3613 int count,
3614 boolean_t syncing) 3614 bool syncing)
3615{ 3615{
3616 xlog_op_header_t *ophead; 3616 xlog_op_header_t *ophead;
3617 xlog_in_core_t *icptr; 3617 xlog_in_core_t *icptr;
@@ -3659,7 +3659,7 @@ xlog_verify_iclog(
3659 /* clientid is only 1 byte */ 3659 /* clientid is only 1 byte */
3660 field_offset = (__psint_t) 3660 field_offset = (__psint_t)
3661 ((xfs_caddr_t)&(ophead->oh_clientid) - base_ptr); 3661 ((xfs_caddr_t)&(ophead->oh_clientid) - base_ptr);
3662 if (syncing == B_FALSE || (field_offset & 0x1ff)) { 3662 if (!syncing || (field_offset & 0x1ff)) {
3663 clientid = ophead->oh_clientid; 3663 clientid = ophead->oh_clientid;
3664 } else { 3664 } else {
3665 idx = BTOBBT((xfs_caddr_t)&(ophead->oh_clientid) - iclog->ic_datap); 3665 idx = BTOBBT((xfs_caddr_t)&(ophead->oh_clientid) - iclog->ic_datap);
@@ -3682,7 +3682,7 @@ xlog_verify_iclog(
3682 /* check length */ 3682 /* check length */
3683 field_offset = (__psint_t) 3683 field_offset = (__psint_t)
3684 ((xfs_caddr_t)&(ophead->oh_len) - base_ptr); 3684 ((xfs_caddr_t)&(ophead->oh_len) - base_ptr);
3685 if (syncing == B_FALSE || (field_offset & 0x1ff)) { 3685 if (!syncing || (field_offset & 0x1ff)) {
3686 op_len = be32_to_cpu(ophead->oh_len); 3686 op_len = be32_to_cpu(ophead->oh_len);
3687 } else { 3687 } else {
3688 idx = BTOBBT((__psint_t)&ophead->oh_len - 3688 idx = BTOBBT((__psint_t)&ophead->oh_len -
diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c
index 6b39115bf145..2d02eac1c9a8 100644
--- a/fs/xfs/xfs_qm_bhv.c
+++ b/fs/xfs/xfs_qm_bhv.c
@@ -146,7 +146,7 @@ xfs_qm_newmount(
146 * inode goes inactive and wants to free blocks, 146 * inode goes inactive and wants to free blocks,
147 * or via xfs_log_mount_finish. 147 * or via xfs_log_mount_finish.
148 */ 148 */
149 *needquotamount = B_TRUE; 149 *needquotamount = true;
150 *quotaflags = mp->m_qflags; 150 *quotaflags = mp->m_qflags;
151 mp->m_qflags = 0; 151 mp->m_qflags = 0;
152 } 152 }
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 8a59f8546552..33d9c2b6f555 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -408,10 +408,10 @@ xfs_qm_scall_getqstat(
408{ 408{
409 struct xfs_quotainfo *q = mp->m_quotainfo; 409 struct xfs_quotainfo *q = mp->m_quotainfo;
410 struct xfs_inode *uip, *gip; 410 struct xfs_inode *uip, *gip;
411 boolean_t tempuqip, tempgqip; 411 bool tempuqip, tempgqip;
412 412
413 uip = gip = NULL; 413 uip = gip = NULL;
414 tempuqip = tempgqip = B_FALSE; 414 tempuqip = tempgqip = false;
415 memset(out, 0, sizeof(fs_quota_stat_t)); 415 memset(out, 0, sizeof(fs_quota_stat_t));
416 416
417 out->qs_version = FS_QSTAT_VERSION; 417 out->qs_version = FS_QSTAT_VERSION;
@@ -434,12 +434,12 @@ xfs_qm_scall_getqstat(
434 if (!uip && mp->m_sb.sb_uquotino != NULLFSINO) { 434 if (!uip && mp->m_sb.sb_uquotino != NULLFSINO) {
435 if (xfs_iget(mp, NULL, mp->m_sb.sb_uquotino, 435 if (xfs_iget(mp, NULL, mp->m_sb.sb_uquotino,
436 0, 0, &uip) == 0) 436 0, 0, &uip) == 0)
437 tempuqip = B_TRUE; 437 tempuqip = true;
438 } 438 }
439 if (!gip && mp->m_sb.sb_gquotino != NULLFSINO) { 439 if (!gip && mp->m_sb.sb_gquotino != NULLFSINO) {
440 if (xfs_iget(mp, NULL, mp->m_sb.sb_gquotino, 440 if (xfs_iget(mp, NULL, mp->m_sb.sb_gquotino,
441 0, 0, &gip) == 0) 441 0, 0, &gip) == 0)
442 tempgqip = B_TRUE; 442 tempgqip = true;
443 } 443 }
444 if (uip) { 444 if (uip) {
445 out->qs_uquota.qfs_nblks = uip->i_d.di_nblocks; 445 out->qs_uquota.qfs_nblks = uip->i_d.di_nblocks;
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index 0c7fa54f309e..642c2d6e1db1 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -516,7 +516,7 @@ xfs_trans_unreserve_and_mod_dquots(
516 int i, j; 516 int i, j;
517 xfs_dquot_t *dqp; 517 xfs_dquot_t *dqp;
518 xfs_dqtrx_t *qtrx, *qa; 518 xfs_dqtrx_t *qtrx, *qa;
519 boolean_t locked; 519 bool locked;
520 520
521 if (!tp->t_dqinfo || !(tp->t_flags & XFS_TRANS_DQ_DIRTY)) 521 if (!tp->t_dqinfo || !(tp->t_flags & XFS_TRANS_DQ_DIRTY))
522 return; 522 return;
@@ -537,17 +537,17 @@ xfs_trans_unreserve_and_mod_dquots(
537 * about the number of blocks used field, or deltas. 537 * about the number of blocks used field, or deltas.
538 * Also we don't bother to zero the fields. 538 * Also we don't bother to zero the fields.
539 */ 539 */
540 locked = B_FALSE; 540 locked = false;
541 if (qtrx->qt_blk_res) { 541 if (qtrx->qt_blk_res) {
542 xfs_dqlock(dqp); 542 xfs_dqlock(dqp);
543 locked = B_TRUE; 543 locked = true;
544 dqp->q_res_bcount -= 544 dqp->q_res_bcount -=
545 (xfs_qcnt_t)qtrx->qt_blk_res; 545 (xfs_qcnt_t)qtrx->qt_blk_res;
546 } 546 }
547 if (qtrx->qt_ino_res) { 547 if (qtrx->qt_ino_res) {
548 if (!locked) { 548 if (!locked) {
549 xfs_dqlock(dqp); 549 xfs_dqlock(dqp);
550 locked = B_TRUE; 550 locked = true;
551 } 551 }
552 dqp->q_res_icount -= 552 dqp->q_res_icount -=
553 (xfs_qcnt_t)qtrx->qt_ino_res; 553 (xfs_qcnt_t)qtrx->qt_ino_res;
@@ -556,7 +556,7 @@ xfs_trans_unreserve_and_mod_dquots(
556 if (qtrx->qt_rtblk_res) { 556 if (qtrx->qt_rtblk_res) {
557 if (!locked) { 557 if (!locked) {
558 xfs_dqlock(dqp); 558 xfs_dqlock(dqp);
559 locked = B_TRUE; 559 locked = true;
560 } 560 }
561 dqp->q_res_rtbcount -= 561 dqp->q_res_rtbcount -=
562 (xfs_qcnt_t)qtrx->qt_rtblk_res; 562 (xfs_qcnt_t)qtrx->qt_rtblk_res;
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h
index 7a41874f4c20..61ba1cfa974c 100644
--- a/fs/xfs/xfs_types.h
+++ b/fs/xfs/xfs_types.h
@@ -32,7 +32,6 @@ typedef unsigned int __uint32_t;
32typedef signed long long int __int64_t; 32typedef signed long long int __int64_t;
33typedef unsigned long long int __uint64_t; 33typedef unsigned long long int __uint64_t;
34 34
35typedef enum { B_FALSE,B_TRUE } boolean_t;
36typedef __uint32_t prid_t; /* project ID */ 35typedef __uint32_t prid_t; /* project ID */
37typedef __uint32_t inst_t; /* an instruction */ 36typedef __uint32_t inst_t; /* an instruction */
38 37
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index d95f565a390e..77ad74834baa 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -725,7 +725,7 @@ xfs_create(
725 int error; 725 int error;
726 xfs_bmap_free_t free_list; 726 xfs_bmap_free_t free_list;
727 xfs_fsblock_t first_block; 727 xfs_fsblock_t first_block;
728 boolean_t unlock_dp_on_error = B_FALSE; 728 bool unlock_dp_on_error = false;
729 uint cancel_flags; 729 uint cancel_flags;
730 int committed; 730 int committed;
731 prid_t prid; 731 prid_t prid;
@@ -794,7 +794,7 @@ xfs_create(
794 } 794 }
795 795
796 xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); 796 xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
797 unlock_dp_on_error = B_TRUE; 797 unlock_dp_on_error = true;
798 798
799 xfs_bmap_init(&free_list, &first_block); 799 xfs_bmap_init(&free_list, &first_block);
800 800
@@ -830,7 +830,7 @@ xfs_create(
830 * error path. 830 * error path.
831 */ 831 */
832 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); 832 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
833 unlock_dp_on_error = B_FALSE; 833 unlock_dp_on_error = false;
834 834
835 error = xfs_dir_createname(tp, dp, name, ip->i_ino, 835 error = xfs_dir_createname(tp, dp, name, ip->i_ino,
836 &first_block, &free_list, resblks ? 836 &first_block, &free_list, resblks ?
@@ -1367,7 +1367,7 @@ xfs_symlink(
1367 int pathlen; 1367 int pathlen;
1368 xfs_bmap_free_t free_list; 1368 xfs_bmap_free_t free_list;
1369 xfs_fsblock_t first_block; 1369 xfs_fsblock_t first_block;
1370 boolean_t unlock_dp_on_error = B_FALSE; 1370 bool unlock_dp_on_error = false;
1371 uint cancel_flags; 1371 uint cancel_flags;
1372 int committed; 1372 int committed;
1373 xfs_fileoff_t first_fsb; 1373 xfs_fileoff_t first_fsb;
@@ -1438,7 +1438,7 @@ xfs_symlink(
1438 } 1438 }
1439 1439
1440 xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); 1440 xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
1441 unlock_dp_on_error = B_TRUE; 1441 unlock_dp_on_error = true;
1442 1442
1443 /* 1443 /*
1444 * Check whether the directory allows new symlinks or not. 1444 * Check whether the directory allows new symlinks or not.
@@ -1484,7 +1484,7 @@ xfs_symlink(
1484 * error path. 1484 * error path.
1485 */ 1485 */
1486 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); 1486 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
1487 unlock_dp_on_error = B_FALSE; 1487 unlock_dp_on_error = false;
1488 1488
1489 /* 1489 /*
1490 * Also attach the dquot(s) to it, if applicable. 1490 * Also attach the dquot(s) to it, if applicable.