Commit 749f24f3 authored by Thomas Meyer's avatar Thomas Meyer Committed by Darrick J. Wong

xfs: Fix bool initialization/comparison

Bool initializations should use true and false. Bool tests don't need
comparisons.
Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 67f2ffe3
...@@ -1477,14 +1477,14 @@ xfs_bmap_isaeof( ...@@ -1477,14 +1477,14 @@ xfs_bmap_isaeof(
int is_empty; int is_empty;
int error; int error;
bma->aeof = 0; bma->aeof = false;
error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec, error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
&is_empty); &is_empty);
if (error) if (error)
return error; return error;
if (is_empty) { if (is_empty) {
bma->aeof = 1; bma->aeof = true;
return 0; return 0;
} }
......
...@@ -1962,7 +1962,7 @@ xfs_difree_inobt( ...@@ -1962,7 +1962,7 @@ xfs_difree_inobt(
if (!(mp->m_flags & XFS_MOUNT_IKEEP) && if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
rec.ir_free == XFS_INOBT_ALL_FREE && rec.ir_free == XFS_INOBT_ALL_FREE &&
mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) { mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
xic->deleted = 1; xic->deleted = true;
xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
xic->alloc = xfs_inobt_irec_to_allocmask(&rec); xic->alloc = xfs_inobt_irec_to_allocmask(&rec);
...@@ -1989,7 +1989,7 @@ xfs_difree_inobt( ...@@ -1989,7 +1989,7 @@ xfs_difree_inobt(
xfs_difree_inode_chunk(mp, agno, &rec, dfops); xfs_difree_inode_chunk(mp, agno, &rec, dfops);
} else { } else {
xic->deleted = 0; xic->deleted = false;
error = xfs_inobt_update(cur, &rec); error = xfs_inobt_update(cur, &rec);
if (error) { if (error) {
......
...@@ -764,7 +764,7 @@ xfs_file_fallocate( ...@@ -764,7 +764,7 @@ xfs_file_fallocate(
enum xfs_prealloc_flags flags = 0; enum xfs_prealloc_flags flags = 0;
uint iolock = XFS_IOLOCK_EXCL; uint iolock = XFS_IOLOCK_EXCL;
loff_t new_size = 0; loff_t new_size = 0;
bool do_file_insert = 0; bool do_file_insert = false;
if (!S_ISREG(inode->i_mode)) if (!S_ISREG(inode->i_mode))
return -EINVAL; return -EINVAL;
...@@ -825,7 +825,7 @@ xfs_file_fallocate( ...@@ -825,7 +825,7 @@ xfs_file_fallocate(
error = -EINVAL; error = -EINVAL;
goto out_unlock; goto out_unlock;
} }
do_file_insert = 1; do_file_insert = true;
} else { } else {
flags |= XFS_PREALLOC_SET; flags |= XFS_PREALLOC_SET;
......
...@@ -2515,7 +2515,7 @@ xlog_write( ...@@ -2515,7 +2515,7 @@ xlog_write(
if (lv) if (lv)
vecp = lv->lv_iovecp; vecp = lv->lv_iovecp;
} }
if (record_cnt == 0 && ordered == false) { if (record_cnt == 0 && !ordered) {
if (!lv) if (!lv)
return 0; return 0;
break; break;
......
...@@ -704,7 +704,7 @@ xfs_mountfs( ...@@ -704,7 +704,7 @@ xfs_mountfs(
xfs_set_maxicount(mp); xfs_set_maxicount(mp);
/* enable fail_at_unmount as default */ /* enable fail_at_unmount as default */
mp->m_fail_unmount = 1; mp->m_fail_unmount = true;
error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, NULL, mp->m_fsname); error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, NULL, mp->m_fsname);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment