summaryrefslogtreecommitdiffstats
path: root/fs/ext4/balloc.c
diff options
context:
space:
mode:
authorEryu Guan <guaneryu@gmail.com>2013-02-22 15:27:47 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-02-22 15:27:47 -0500
commitd43814721111041e26671a153e300e2054fb36fa (patch)
treecf9fd202aca4cae83989000219921ac99134f557 /fs/ext4/balloc.c
parent1231b3a1eb5740192aeebf5344dd6d6da000febf (diff)
downloadop-kernel-dev-d43814721111041e26671a153e300e2054fb36fa.zip
op-kernel-dev-d43814721111041e26671a153e300e2054fb36fa.tar.gz
ext4: no need to remove extent if len is 0 in ext4_es_remove_extent()
len is 0 means no extent needs to be removed, so return immediately. Otherwise it could trigger the following BUG_ON() in ext4_es_remove_extent() end = lblk + len - 1; BUG_ON(end < lblk); This could be reproduced by a simple truncate(1) command by an unprivileged user truncate -s $(($((2**32 - 1)) * 4096)) /mnt/ext4/testfile The same is true for __es_insert_extent(). Patched kernel passed xfstests regression test. Signed-off-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Diffstat (limited to 'fs/ext4/balloc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud