]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[GFS2] Fix a bug on i386 due to evaluation order
authorSteven Whitehouse <swhiteho@redhat.com>
Sun, 18 Mar 2007 16:05:27 +0000 (16:05 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 1 May 2007 08:10:42 +0000 (09:10 +0100)
Since gcc didn't evaluate the last two terms of the expression in
glock.c:1881 as a constant expression, it resulted in an error on
i386 due to the lack of a 64bit divide instruction. This adds some
brackets to fix the problem.

This was reported by Andrew Morton.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
fs/gfs2/glock.c

index e7075945b051a4ab57ad217da612a2af0027b268..b8aa816bb6eb278c77474e0c3cdf0910e13d2502 100644 (file)
@@ -1880,7 +1880,7 @@ static int dump_glock(struct glock_iter *gi, struct gfs2_glock *gl)
        if (test_bit(GLF_DEMOTE, &gl->gl_flags)) {
                print_dbg(gi, "  Demotion req to state %u (%llu uS ago)\n",
                          gl->gl_demote_state,
-                         (u64)(jiffies - gl->gl_demote_time)*1000000/HZ);
+                         (u64)(jiffies - gl->gl_demote_time)*(1000000/HZ));
        }
        if (gl->gl_ops == &gfs2_inode_glops && gl->gl_object) {
                if (!test_bit(GLF_LOCK, &gl->gl_flags) &&