diff options
author | Steve French <sfrench@us.ibm.com> | 2008-04-28 20:06:05 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-28 20:06:05 -0400 |
commit | 4b18f2a9c3964f7612b7403dddc1d1ba5443ae24 (patch) | |
tree | 6deaca1844706e70e235be6fe502269e4f15355f /fs/cifs/inode.c | |
parent | e9f20d6f03e8df393b001dab6dc5226c2a5daf57 (diff) |
[CIFS] convert usage of implicit booleans to bool
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index e1031b9e2c55..8eaa9e72fe8e 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -281,7 +281,7 @@ static int decode_sfu_inode(struct inode *inode, __u64 size, | |||
281 | struct cifs_sb_info *cifs_sb, int xid) | 281 | struct cifs_sb_info *cifs_sb, int xid) |
282 | { | 282 | { |
283 | int rc; | 283 | int rc; |
284 | int oplock = FALSE; | 284 | int oplock = 0; |
285 | __u16 netfid; | 285 | __u16 netfid; |
286 | struct cifsTconInfo *pTcon = cifs_sb->tcon; | 286 | struct cifsTconInfo *pTcon = cifs_sb->tcon; |
287 | char buf[24]; | 287 | char buf[24]; |
@@ -389,7 +389,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
389 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 389 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
390 | const unsigned char *full_path = NULL; | 390 | const unsigned char *full_path = NULL; |
391 | char *buf = NULL; | 391 | char *buf = NULL; |
392 | int adjustTZ = FALSE; | 392 | bool adjustTZ = bool; |
393 | bool is_dfs_referral = false; | 393 | bool is_dfs_referral = false; |
394 | 394 | ||
395 | pTcon = cifs_sb->tcon; | 395 | pTcon = cifs_sb->tcon; |
@@ -425,7 +425,7 @@ try_again_CIFSSMBQPathInfo: | |||
425 | pfindData, cifs_sb->local_nls, | 425 | pfindData, cifs_sb->local_nls, |
426 | cifs_sb->mnt_cifs_flags & | 426 | cifs_sb->mnt_cifs_flags & |
427 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 427 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
428 | adjustTZ = TRUE; | 428 | adjustTZ = true; |
429 | } | 429 | } |
430 | } | 430 | } |
431 | /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ | 431 | /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ |
@@ -703,7 +703,7 @@ psx_del_no_retry: | |||
703 | } else if (rc == -ENOENT) { | 703 | } else if (rc == -ENOENT) { |
704 | d_drop(direntry); | 704 | d_drop(direntry); |
705 | } else if (rc == -ETXTBSY) { | 705 | } else if (rc == -ETXTBSY) { |
706 | int oplock = FALSE; | 706 | int oplock = 0; |
707 | __u16 netfid; | 707 | __u16 netfid; |
708 | 708 | ||
709 | rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE, | 709 | rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE, |
@@ -736,7 +736,7 @@ psx_del_no_retry: | |||
736 | rc = -EOPNOTSUPP; | 736 | rc = -EOPNOTSUPP; |
737 | 737 | ||
738 | if (rc == -EOPNOTSUPP) { | 738 | if (rc == -EOPNOTSUPP) { |
739 | int oplock = FALSE; | 739 | int oplock = 0; |
740 | __u16 netfid; | 740 | __u16 netfid; |
741 | /* rc = CIFSSMBSetAttrLegacy(xid, pTcon, | 741 | /* rc = CIFSSMBSetAttrLegacy(xid, pTcon, |
742 | full_path, | 742 | full_path, |
@@ -774,7 +774,7 @@ psx_del_no_retry: | |||
774 | if (direntry->d_inode) | 774 | if (direntry->d_inode) |
775 | drop_nlink(direntry->d_inode); | 775 | drop_nlink(direntry->d_inode); |
776 | } else if (rc == -ETXTBSY) { | 776 | } else if (rc == -ETXTBSY) { |
777 | int oplock = FALSE; | 777 | int oplock = 0; |
778 | __u16 netfid; | 778 | __u16 netfid; |
779 | 779 | ||
780 | rc = CIFSSMBOpen(xid, pTcon, full_path, | 780 | rc = CIFSSMBOpen(xid, pTcon, full_path, |
@@ -1149,7 +1149,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry, | |||
1149 | cFYI(1, ("rename rc %d", rc)); | 1149 | cFYI(1, ("rename rc %d", rc)); |
1150 | 1150 | ||
1151 | if ((rc == -EIO) || (rc == -EEXIST)) { | 1151 | if ((rc == -EIO) || (rc == -EEXIST)) { |
1152 | int oplock = FALSE; | 1152 | int oplock = 0; |
1153 | __u16 netfid; | 1153 | __u16 netfid; |
1154 | 1154 | ||
1155 | /* BB FIXME Is Generic Read correct for rename? */ | 1155 | /* BB FIXME Is Generic Read correct for rename? */ |
@@ -1186,7 +1186,7 @@ int cifs_revalidate(struct dentry *direntry) | |||
1186 | struct cifsInodeInfo *cifsInode; | 1186 | struct cifsInodeInfo *cifsInode; |
1187 | loff_t local_size; | 1187 | loff_t local_size; |
1188 | struct timespec local_mtime; | 1188 | struct timespec local_mtime; |
1189 | int invalidate_inode = FALSE; | 1189 | bool invalidate_inode = false; |
1190 | 1190 | ||
1191 | if (direntry->d_inode == NULL) | 1191 | if (direntry->d_inode == NULL) |
1192 | return -ENOENT; | 1192 | return -ENOENT; |
@@ -1268,7 +1268,7 @@ int cifs_revalidate(struct dentry *direntry) | |||
1268 | only ones who could have modified the file and the | 1268 | only ones who could have modified the file and the |
1269 | server copy is staler than ours */ | 1269 | server copy is staler than ours */ |
1270 | } else { | 1270 | } else { |
1271 | invalidate_inode = TRUE; | 1271 | invalidate_inode = true; |
1272 | } | 1272 | } |
1273 | } | 1273 | } |
1274 | 1274 | ||
@@ -1402,8 +1402,8 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1402 | int rc = -EACCES; | 1402 | int rc = -EACCES; |
1403 | struct cifsFileInfo *open_file = NULL; | 1403 | struct cifsFileInfo *open_file = NULL; |
1404 | FILE_BASIC_INFO time_buf; | 1404 | FILE_BASIC_INFO time_buf; |
1405 | int set_time = FALSE; | 1405 | bool set_time = false; |
1406 | int set_dosattr = FALSE; | 1406 | bool set_dosattr = false; |
1407 | __u64 mode = 0xFFFFFFFFFFFFFFFFULL; | 1407 | __u64 mode = 0xFFFFFFFFFFFFFFFFULL; |
1408 | __u64 uid = 0xFFFFFFFFFFFFFFFFULL; | 1408 | __u64 uid = 0xFFFFFFFFFFFFFFFFULL; |
1409 | __u64 gid = 0xFFFFFFFFFFFFFFFFULL; | 1409 | __u64 gid = 0xFFFFFFFFFFFFFFFFULL; |
@@ -1464,7 +1464,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1464 | __u16 nfid = open_file->netfid; | 1464 | __u16 nfid = open_file->netfid; |
1465 | __u32 npid = open_file->pid; | 1465 | __u32 npid = open_file->pid; |
1466 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, | 1466 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, |
1467 | nfid, npid, FALSE); | 1467 | nfid, npid, false); |
1468 | atomic_dec(&open_file->wrtPending); | 1468 | atomic_dec(&open_file->wrtPending); |
1469 | cFYI(1, ("SetFSize for attrs rc = %d", rc)); | 1469 | cFYI(1, ("SetFSize for attrs rc = %d", rc)); |
1470 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { | 1470 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { |
@@ -1484,14 +1484,14 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1484 | it was found or because there was an error setting | 1484 | it was found or because there was an error setting |
1485 | it by handle */ | 1485 | it by handle */ |
1486 | rc = CIFSSMBSetEOF(xid, pTcon, full_path, | 1486 | rc = CIFSSMBSetEOF(xid, pTcon, full_path, |
1487 | attrs->ia_size, FALSE, | 1487 | attrs->ia_size, false, |
1488 | cifs_sb->local_nls, | 1488 | cifs_sb->local_nls, |
1489 | cifs_sb->mnt_cifs_flags & | 1489 | cifs_sb->mnt_cifs_flags & |
1490 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 1490 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
1491 | cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc)); | 1491 | cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc)); |
1492 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { | 1492 | if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { |
1493 | __u16 netfid; | 1493 | __u16 netfid; |
1494 | int oplock = FALSE; | 1494 | int oplock = 0; |
1495 | 1495 | ||
1496 | rc = SMBLegacyOpen(xid, pTcon, full_path, | 1496 | rc = SMBLegacyOpen(xid, pTcon, full_path, |
1497 | FILE_OPEN, | 1497 | FILE_OPEN, |
@@ -1516,7 +1516,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1516 | 1516 | ||
1517 | /* Server is ok setting allocation size implicitly - no need | 1517 | /* Server is ok setting allocation size implicitly - no need |
1518 | to call: | 1518 | to call: |
1519 | CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, TRUE, | 1519 | CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, true, |
1520 | cifs_sb->local_nls); | 1520 | cifs_sb->local_nls); |
1521 | */ | 1521 | */ |
1522 | 1522 | ||
@@ -1564,7 +1564,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1564 | #endif | 1564 | #endif |
1565 | /* not writeable */ | 1565 | /* not writeable */ |
1566 | if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) { | 1566 | if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) { |
1567 | set_dosattr = TRUE; | 1567 | set_dosattr = true; |
1568 | time_buf.Attributes = | 1568 | time_buf.Attributes = |
1569 | cpu_to_le32(cifsInode->cifsAttrs | | 1569 | cpu_to_le32(cifsInode->cifsAttrs | |
1570 | ATTR_READONLY); | 1570 | ATTR_READONLY); |
@@ -1574,7 +1574,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1574 | not be able to write to it - so if any write | 1574 | not be able to write to it - so if any write |
1575 | bit is enabled for user or group or other we | 1575 | bit is enabled for user or group or other we |
1576 | need to at least try to remove r/o dos attr */ | 1576 | need to at least try to remove r/o dos attr */ |
1577 | set_dosattr = TRUE; | 1577 | set_dosattr = true; |
1578 | time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs & | 1578 | time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs & |
1579 | (~ATTR_READONLY)); | 1579 | (~ATTR_READONLY)); |
1580 | /* Windows ignores set to zero */ | 1580 | /* Windows ignores set to zero */ |
@@ -1588,14 +1588,14 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1588 | } | 1588 | } |
1589 | 1589 | ||
1590 | if (attrs->ia_valid & ATTR_ATIME) { | 1590 | if (attrs->ia_valid & ATTR_ATIME) { |
1591 | set_time = TRUE; | 1591 | set_time = true; |
1592 | time_buf.LastAccessTime = | 1592 | time_buf.LastAccessTime = |
1593 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime)); | 1593 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime)); |
1594 | } else | 1594 | } else |
1595 | time_buf.LastAccessTime = 0; | 1595 | time_buf.LastAccessTime = 0; |
1596 | 1596 | ||
1597 | if (attrs->ia_valid & ATTR_MTIME) { | 1597 | if (attrs->ia_valid & ATTR_MTIME) { |
1598 | set_time = TRUE; | 1598 | set_time = true; |
1599 | time_buf.LastWriteTime = | 1599 | time_buf.LastWriteTime = |
1600 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime)); | 1600 | cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime)); |
1601 | } else | 1601 | } else |
@@ -1606,7 +1606,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1606 | server times */ | 1606 | server times */ |
1607 | 1607 | ||
1608 | if (set_time && (attrs->ia_valid & ATTR_CTIME)) { | 1608 | if (set_time && (attrs->ia_valid & ATTR_CTIME)) { |
1609 | set_time = TRUE; | 1609 | set_time = true; |
1610 | /* Although Samba throws this field away | 1610 | /* Although Samba throws this field away |
1611 | it may be useful to Windows - but we do | 1611 | it may be useful to Windows - but we do |
1612 | not want to set ctime unless some other | 1612 | not want to set ctime unless some other |
@@ -1630,7 +1630,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1630 | rc = -EOPNOTSUPP; | 1630 | rc = -EOPNOTSUPP; |
1631 | 1631 | ||
1632 | if (rc == -EOPNOTSUPP) { | 1632 | if (rc == -EOPNOTSUPP) { |
1633 | int oplock = FALSE; | 1633 | int oplock = 0; |
1634 | __u16 netfid; | 1634 | __u16 netfid; |
1635 | 1635 | ||
1636 | cFYI(1, ("calling SetFileInfo since SetPathInfo for " | 1636 | cFYI(1, ("calling SetFileInfo since SetPathInfo for " |