]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs/ocfs2/journal.h: add bits_wanted while calculating credits in ocfs2_calc_extend_cr...
authorGoldwyn Rodrigues <rgoldwyn@gmail.com>
Wed, 19 Jun 2013 00:05:39 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:48 +0000 (17:12 +1000)
commitf256ef401aa91a7d4fa54071f801e9c35cffd57f
tree0a3fd144025fd94376843f8153832fa9e19fc7e4
parentc88b5f188398f4d122a2d9f7da6f9be8bcc75b5a
fs/ocfs2/journal.h: add bits_wanted while calculating credits in ocfs2_calc_extend_credits

While adding extends to a file, the credits are calculated incorrectly and
if the requested clusters is more than one (or more because we used a
conservative limit) then we run out of journal credits and we hit an
assert in journalling code.

The function parameter bits_wanted variable was not used at all.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/journal.h