android_kernel_samsung_msm8976/fs/ubifs
Artem Bityutskiy 6f1aec53ed UBIFS: fix free log space calculation
commit ba29e721eb2df6df8f33c1f248388bb037a47914 upstream.

Hu (hujianyang <hujianyang@huawei.com>) discovered an issue in the
'empty_log_bytes()' function, which calculates how many bytes are left in the
log:

"
If 'c->lhead_lnum + 1 == c->ltail_lnum' and 'c->lhead_offs == c->leb_size', 'h'
would equalent to 't' and 'empty_log_bytes()' would return 'c->log_bytes'
instead of 0.
"

At this point it is not clear what would be the consequences of this, and
whether this may lead to any problems, but this patch addresses the issue just
in case.

Tested-by: hujianyang <hujianyang@huawei.com>
Reported-by: hujianyang <hujianyang@huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-14 08:47:54 -08:00
..
budget.c
commit.c UBIFS: fix a race condition 2014-11-14 08:47:54 -08:00
compress.c
debug.c
debug.h
dir.c
file.c
find.c
gc.c
io.c
ioctl.c
journal.c
Kconfig
key.h
log.c UBIFS: fix free log space calculation 2014-11-14 08:47:54 -08:00
lprops.c
lpt.c
lpt_commit.c
Makefile
master.c UBIFS: remove mst_mutex 2014-11-14 08:47:54 -08:00
misc.h
orphan.c
recovery.c
replay.c
sb.c
scan.c
shrinker.c
super.c UBIFS: remove mst_mutex 2014-11-14 08:47:54 -08:00
tnc.c
tnc_commit.c
tnc_misc.c
ubifs-media.h
ubifs.h UBIFS: remove mst_mutex 2014-11-14 08:47:54 -08:00
xattr.c