]> git.baikalelectronics.ru Git - kernel.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)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 4 Apr 2011 19:40:24 +0000 (15:40 -0400)
commit934307fe8b16cf78e561f304d4cdf2129350fab3
tree3e9ce0bc590399f78808fce8279d04c61301beb8
parent1603488f847f21a69f534eac1b0952dfa1b55eb6
ext4: fix credits computing for indirect mapped files

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>
Cc: stable@kernel.org
fs/ext4/inode.c