summaryrefslogtreecommitdiff
path: root/fs/ntfs/logfile.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-06-25 19:51:58 +0400
committerAnton Altaparmakov <aia21@cantab.net>2005-06-25 19:51:58 +0400
commit3bd1f4a173a3445f9919c21e775de2d8b9deacf8 (patch)
tree6b32056b5b63d41fc5d032318ed0f94dbc562288 /fs/ntfs/logfile.c
parentca8fd7a0c6aa835e8014830b290cb965e85ac88e (diff)
downloadlinux-3bd1f4a173a3445f9919c21e775de2d8b9deacf8.tar.xz
NTFS: Fix several occurences of a bug where we would perform 'var & ~const'
with a 64-bit variable and a int, i.e. 32-bit, constant. This causes the higher order 32-bits of the 64-bit variable to be zeroed. To fix this cast the 'const' to the same 64-bit type as 'var'. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/logfile.c')
-rw-r--r--fs/ntfs/logfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c
index e680dd0cdb64..8edb8e20fb08 100644
--- a/fs/ntfs/logfile.c
+++ b/fs/ntfs/logfile.c
@@ -1,7 +1,7 @@
/*
* logfile.c - NTFS kernel journal handling. Part of the Linux-NTFS project.
*
- * Copyright (c) 2002-2004 Anton Altaparmakov
+ * Copyright (c) 2002-2005 Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -410,7 +410,7 @@ err_out:
}
/**
- * ntfs_ckeck_logfile - check in the journal if the volume is consistent
+ * ntfs_check_logfile - check the journal for consistency
* @log_vi: struct inode of loaded journal $LogFile to check
*
* Check the $LogFile journal for consistency and return TRUE if it is
@@ -464,7 +464,7 @@ BOOL ntfs_check_logfile(struct inode *log_vi)
* optimize log_page_size and log_page_bits into constants.
*/
log_page_bits = generic_ffs(log_page_size) - 1;
- size &= ~(log_page_size - 1);
+ size &= ~(s64)(log_page_size - 1);
/*
* Ensure the log file is big enough to store at least the two restart
* pages and the minimum number of log record pages.