aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_imap.c
diff options
context:
space:
mode:
authorRichard Knutsson <ricknu-0@student.ltu.se>2006-10-01 02:27:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:19 -0400
commit4d81715fc5dfa1680ad47d7edf3ac4a74c5bf104 (patch)
treeec5de5f1e7aa18911fe76957e106fc3492048e86 /fs/jfs/jfs_imap.c
parentc49c31115067bc7c9a51ffdc735a515151dfa3eb (diff)
[PATCH] fs/jfs: Conversion to generic boolean
Conversion of booleans to: generic-boolean.patch (2006-08-23) Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jfs/jfs_imap.c')
-rw-r--r--fs/jfs/jfs_imap.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 369d7f39c040..a45ee2489580 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -78,8 +78,8 @@ static HLIST_HEAD(aggregate_hash);
78/* 78/*
79 * forward references 79 * forward references
80 */ 80 */
81static int diAllocAG(struct inomap *, int, boolean_t, struct inode *); 81static int diAllocAG(struct inomap *, int, bool, struct inode *);
82static int diAllocAny(struct inomap *, int, boolean_t, struct inode *); 82static int diAllocAny(struct inomap *, int, bool, struct inode *);
83static int diAllocBit(struct inomap *, struct iag *, int); 83static int diAllocBit(struct inomap *, struct iag *, int);
84static int diAllocExt(struct inomap *, int, struct inode *); 84static int diAllocExt(struct inomap *, int, struct inode *);
85static int diAllocIno(struct inomap *, int, struct inode *); 85static int diAllocIno(struct inomap *, int, struct inode *);
@@ -1345,7 +1345,7 @@ diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp)
1345 * 1345 *
1346 * PARAMETERS: 1346 * PARAMETERS:
1347 * pip - pointer to incore inode for the parent inode. 1347 * pip - pointer to incore inode for the parent inode.
1348 * dir - TRUE if the new disk inode is for a directory. 1348 * dir - 'true' if the new disk inode is for a directory.
1349 * ip - pointer to a new inode 1349 * ip - pointer to a new inode
1350 * 1350 *
1351 * RETURN VALUES: 1351 * RETURN VALUES:
@@ -1353,7 +1353,7 @@ diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp)
1353 * -ENOSPC - insufficient disk resources. 1353 * -ENOSPC - insufficient disk resources.
1354 * -EIO - i/o error. 1354 * -EIO - i/o error.
1355 */ 1355 */
1356int diAlloc(struct inode *pip, boolean_t dir, struct inode *ip) 1356int diAlloc(struct inode *pip, bool dir, struct inode *ip)
1357{ 1357{
1358 int rc, ino, iagno, addext, extno, bitno, sword; 1358 int rc, ino, iagno, addext, extno, bitno, sword;
1359 int nwords, rem, i, agno; 1359 int nwords, rem, i, agno;
@@ -1375,7 +1375,7 @@ int diAlloc(struct inode *pip, boolean_t dir, struct inode *ip)
1375 /* for a directory, the allocation policy is to start 1375 /* for a directory, the allocation policy is to start
1376 * at the ag level using the preferred ag. 1376 * at the ag level using the preferred ag.
1377 */ 1377 */
1378 if (dir == TRUE) { 1378 if (dir) {
1379 agno = dbNextAG(JFS_SBI(pip->i_sb)->ipbmap); 1379 agno = dbNextAG(JFS_SBI(pip->i_sb)->ipbmap);
1380 AG_LOCK(imap, agno); 1380 AG_LOCK(imap, agno);
1381 goto tryag; 1381 goto tryag;
@@ -1651,7 +1651,7 @@ int diAlloc(struct inode *pip, boolean_t dir, struct inode *ip)
1651 * PARAMETERS: 1651 * PARAMETERS:
1652 * imap - pointer to inode map control structure. 1652 * imap - pointer to inode map control structure.
1653 * agno - allocation group to allocate from. 1653 * agno - allocation group to allocate from.
1654 * dir - TRUE if the new disk inode is for a directory. 1654 * dir - 'true' if the new disk inode is for a directory.
1655 * ip - pointer to the new inode to be filled in on successful return 1655 * ip - pointer to the new inode to be filled in on successful return
1656 * with the disk inode number allocated, its extent address 1656 * with the disk inode number allocated, its extent address
1657 * and the start of the ag. 1657 * and the start of the ag.
@@ -1662,7 +1662,7 @@ int diAlloc(struct inode *pip, boolean_t dir, struct inode *ip)
1662 * -EIO - i/o error. 1662 * -EIO - i/o error.
1663 */ 1663 */
1664static int 1664static int
1665diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip) 1665diAllocAG(struct inomap * imap, int agno, bool dir, struct inode *ip)
1666{ 1666{
1667 int rc, addext, numfree, numinos; 1667 int rc, addext, numfree, numinos;
1668 1668
@@ -1682,7 +1682,7 @@ diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip)
1682 * if there are a small number of free inodes or number of free 1682 * if there are a small number of free inodes or number of free
1683 * inodes is a small percentage of the number of backed inodes. 1683 * inodes is a small percentage of the number of backed inodes.
1684 */ 1684 */
1685 if (dir == TRUE) 1685 if (dir)
1686 addext = (numfree < 64 || 1686 addext = (numfree < 64 ||
1687 (numfree < 256 1687 (numfree < 256
1688 && ((numfree * 100) / numinos) <= 20)); 1688 && ((numfree * 100) / numinos) <= 20));
@@ -1721,7 +1721,7 @@ diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip)
1721 * PARAMETERS: 1721 * PARAMETERS:
1722 * imap - pointer to inode map control structure. 1722 * imap - pointer to inode map control structure.
1723 * agno - primary allocation group (to avoid). 1723 * agno - primary allocation group (to avoid).
1724 * dir - TRUE if the new disk inode is for a directory. 1724 * dir - 'true' if the new disk inode is for a directory.
1725 * ip - pointer to a new inode to be filled in on successful return 1725 * ip - pointer to a new inode to be filled in on successful return
1726 * with the disk inode number allocated, its extent address 1726 * with the disk inode number allocated, its extent address
1727 * and the start of the ag. 1727 * and the start of the ag.
@@ -1732,7 +1732,7 @@ diAllocAG(struct inomap * imap, int agno, boolean_t dir, struct inode *ip)
1732 * -EIO - i/o error. 1732 * -EIO - i/o error.
1733 */ 1733 */
1734static int 1734static int
1735diAllocAny(struct inomap * imap, int agno, boolean_t dir, struct inode *ip) 1735diAllocAny(struct inomap * imap, int agno, bool dir, struct inode *ip)
1736{ 1736{
1737 int ag, rc; 1737 int ag, rc;
1738 int maxag = JFS_SBI(imap->im_ipimap->i_sb)->bmap->db_maxag; 1738 int maxag = JFS_SBI(imap->im_ipimap->i_sb)->bmap->db_maxag;
@@ -2749,7 +2749,7 @@ static int diFindFree(u32 word, int start)
2749 * PARAMETERS: 2749 * PARAMETERS:
2750 * ipimap - Incore inode map inode 2750 * ipimap - Incore inode map inode
2751 * inum - Number of inode to mark in permanent map 2751 * inum - Number of inode to mark in permanent map
2752 * is_free - If TRUE indicates inode should be marked freed, otherwise 2752 * is_free - If 'true' indicates inode should be marked freed, otherwise
2753 * indicates inode should be marked allocated. 2753 * indicates inode should be marked allocated.
2754 * 2754 *
2755 * RETURN VALUES: 2755 * RETURN VALUES:
@@ -2757,7 +2757,7 @@ static int diFindFree(u32 word, int start)
2757 */ 2757 */
2758int 2758int
2759diUpdatePMap(struct inode *ipimap, 2759diUpdatePMap(struct inode *ipimap,
2760 unsigned long inum, boolean_t is_free, struct tblock * tblk) 2760 unsigned long inum, bool is_free, struct tblock * tblk)
2761{ 2761{
2762 int rc; 2762 int rc;
2763 struct iag *iagp; 2763 struct iag *iagp;
@@ -2796,7 +2796,7 @@ diUpdatePMap(struct inode *ipimap,
2796 /* 2796 /*
2797 * mark the inode free in persistent map: 2797 * mark the inode free in persistent map:
2798 */ 2798 */
2799 if (is_free == TRUE) { 2799 if (is_free) {
2800 /* The inode should have been allocated both in working 2800 /* The inode should have been allocated both in working
2801 * map and in persistent map; 2801 * map and in persistent map;
2802 * the inode will be freed from working map at the release 2802 * the inode will be freed from working map at the release