[PATCH 2/5] Fix undefined ">> 32" in revoke code
Stephen Tweedie <[email protected]>
| Newsgroups | gmane.comp.file-systems.ext2.devel |
|---|---|
| Message-ID | <[email protected]> |
"val >> 32" is undefined if val is a 32-bit value, so this code is broken if CONFIG_LBD is not set. Make it safe for that case. Signed-off-by: Stephen Tweedie <[email protected]> --- fs/jbd/revoke.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index eb7c073..98de659 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c @@ -110,7 +110,7 @@ static inline int hash(journal_t *journa { struct jbd_revoke_table_s *table = journal->j_revoke; int hash_shift = table->hash_shift; - int hash = (int)block ^ (int)(block >> 32); + int hash = (int)block ^ (int)((block >> 31) >> 1); return ((hash << (hash_shift - 6)) ^ (hash >> 13) ^ -- 1.4.0 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642