]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix credits computing for indirect mapped files
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Mon, 4 Apr 2011 19:40:24 +0000 (15:40 -0400)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:34 +0000 (16:53 +0200)
commit4481102ac28aa5759acb5aad56aa8c36c4afb198
tree227f29499756742ea2704e4e72f01ee84009815b
parent008c3e5897181fe8f64d6e00411e795a97b52709
ext4: fix credits computing for indirect mapped files

commit 5b41395fcc0265fc9f193aef9df39ce49d64677c upstream.

When writing a contiguous set of blocks, two indirect blocks could be
needed depending on how the blocks are aligned, so we need to increase
the number of credits needed by one.

[ Also fixed a another bug which could further underestimate the
  number of journal credits needed by 1; the code was using integer
  division instead of DIV_ROUND_UP() -- tytso]

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/inode.c