]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: Fix the wrong calculation of t_max_wait in update_t_max_wait
authorTao Ma <boyu.mt@taobao.com>
Mon, 23 May 2011 01:45:26 +0000 (21:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 23 May 2011 01:45:26 +0000 (21:45 -0400)
commit4f5b226284b0bc038db42bc2fc05d53978d31558
treedb83cfc348e1ff652aea17eff6ff4eb07d8cd8a9
parentdd34add479f83fbc80571e156fc7d3224af70ae1
jbd2: Fix the wrong calculation of t_max_wait in update_t_max_wait

t_max_wait is added in commit a7cdf977 to indicate how long we
were waiting for new transaction to start. In commit 5504205e,
it is moved to another function named update_t_max_wait to
avoid a build warning. But the wrong thing is that the original
'ts' is initialized in the start of function start_this_handle
and we can calculate t_max_wait in the right way. while with
this change, ts is initialized within the function and t_max_wait
can never be calculated right.

This patch moves the initialization of ts to the original beginning
of start_this_handle and pass it to function update_t_max_wait so
that it can be calculated right and the build warning is avoided also.

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/jbd2/transaction.c