git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xfs: byteswap constants instead of variables
[pandora-kernel.git]
/
fs
/
xfs
/
xfs_log_recover.c
diff --git
a/fs/xfs/xfs_log_recover.c
b/fs/xfs/xfs_log_recover.c
index
04142ca
..
fb528b3
100644
(file)
--- a/
fs/xfs/xfs_log_recover.c
+++ b/
fs/xfs/xfs_log_recover.c
@@
-300,14
+300,14
@@
xlog_header_check_recover(
xfs_mount_t *mp,
xlog_rec_header_t *head)
{
xfs_mount_t *mp,
xlog_rec_header_t *head)
{
- ASSERT(
be32_to_cpu(head->h_magicno) == XLOG_HEADER_MAGIC_NUM
);
+ ASSERT(
head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM)
);
/*
* IRIX doesn't write the h_fmt field and leaves it zeroed
* (XLOG_FMT_UNKNOWN). This stops us from trying to recover
* a dirty log created in IRIX.
*/
/*
* IRIX doesn't write the h_fmt field and leaves it zeroed
* (XLOG_FMT_UNKNOWN). This stops us from trying to recover
* a dirty log created in IRIX.
*/
- if (unlikely(
be32_to_cpu(head->h_fmt) != XLOG_FMT
)) {
+ if (unlikely(
head->h_fmt != cpu_to_be32(XLOG_FMT)
)) {
xfs_warn(mp,
"dirty log written in incompatible format - can't recover");
xlog_header_check_dump(mp, head);
xfs_warn(mp,
"dirty log written in incompatible format - can't recover");
xlog_header_check_dump(mp, head);
@@
-333,7
+333,7
@@
xlog_header_check_mount(
xfs_mount_t *mp,
xlog_rec_header_t *head)
{
xfs_mount_t *mp,
xlog_rec_header_t *head)
{
- ASSERT(
be32_to_cpu(head->h_magicno) == XLOG_HEADER_MAGIC_NUM
);
+ ASSERT(
head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM)
);
if (uuid_is_nil(&head->h_fs_uuid)) {
/*
if (uuid_is_nil(&head->h_fs_uuid)) {
/*
@@
-534,7
+534,7
@@
xlog_find_verify_log_record(
head = (xlog_rec_header_t *)offset;
head = (xlog_rec_header_t *)offset;
- if (
XLOG_HEADER_MAGIC_NUM == be32_to_cpu(head->h_magicno
))
+ if (
head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM
))
break;
if (!smallmem)
break;
if (!smallmem)
@@
-916,7
+916,7
@@
xlog_find_tail(
if (error)
goto done;
if (error)
goto done;
- if (
XLOG_HEADER_MAGIC_NUM == be32_to_cpu(*(__be32 *)offset
)) {
+ if (
*(__be32 *)offset == cpu_to_be32(XLOG_HEADER_MAGIC_NUM
)) {
found = 1;
break;
}
found = 1;
break;
}
@@
-933,8
+933,8
@@
xlog_find_tail(
if (error)
goto done;
if (error)
goto done;
- if (
XLOG_HEADER_MAGIC_NUM
==
-
be32_to_cpu(*(__be32 *)offset
)) {
+ if (
*(__be32 *)offset
==
+
cpu_to_be32(XLOG_HEADER_MAGIC_NUM
)) {
found = 2;
break;
}
found = 2;
break;
}
@@
-1947,7
+1947,7
@@
xfs_qm_dqcheck(
* This is all fine; things are still consistent, and we haven't lost
* any quota information. Just don't complain about bad dquot blks.
*/
* This is all fine; things are still consistent, and we haven't lost
* any quota information. Just don't complain about bad dquot blks.
*/
- if (
be16_to_cpu(ddq->d_magic) != XFS_DQUOT_MAGIC
) {
+ if (
ddq->d_magic != cpu_to_be16(XFS_DQUOT_MAGIC)
) {
if (flags & XFS_QMOPT_DOWARN)
xfs_alert(mp,
"%s : XFS dquot ID 0x%x, magic 0x%x != 0x%x",
if (flags & XFS_QMOPT_DOWARN)
xfs_alert(mp,
"%s : XFS dquot ID 0x%x, magic 0x%x != 0x%x",
@@
-2238,7
+2238,7
@@
xlog_recover_inode_pass2(
* Make sure the place we're flushing out to really looks
* like an inode!
*/
* Make sure the place we're flushing out to really looks
* like an inode!
*/
- if (unlikely(
be16_to_cpu(dip->di_magic) != XFS_DINODE_MAGIC
)) {
+ if (unlikely(
dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC)
)) {
xfs_buf_relse(bp);
xfs_alert(mp,
"%s: Bad inode magic number, dip = 0x%p, dino bp = 0x%p, ino = %Ld",
xfs_buf_relse(bp);
xfs_alert(mp,
"%s: Bad inode magic number, dip = 0x%p, dino bp = 0x%p, ino = %Ld",
@@
-3295,7
+3295,7
@@
xlog_valid_rec_header(
{
int hlen;
{
int hlen;
- if (unlikely(
be32_to_cpu(rhead->h_magicno) != XLOG_HEADER_MAGIC_NUM
)) {
+ if (unlikely(
rhead->h_magicno != cpu_to_be32(XLOG_HEADER_MAGIC_NUM)
)) {
XFS_ERROR_REPORT("xlog_valid_rec_header(1)",
XFS_ERRLEVEL_LOW, log->l_mp);
return XFS_ERROR(EFSCORRUPTED);
XFS_ERROR_REPORT("xlog_valid_rec_header(1)",
XFS_ERRLEVEL_LOW, log->l_mp);
return XFS_ERROR(EFSCORRUPTED);