linux/fs/ubifs
Artem Bityutskiy d53133bd0c UBIFS: fix free log space calculation
commit ba29e721eb 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:59:46 -08:00
..
budget.c
commit.c UBIFS: fix a race condition 2014-11-14 08:59:46 -08:00
compress.c
debug.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
debug.h
dir.c
file.c UBIFS: fix an mmap and fsync race condition 2014-07-06 18:57:26 -07:00
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:59:46 -08:00
lprops.c
lpt_commit.c
lpt.c
Makefile
master.c UBIFS: remove mst_mutex 2014-11-14 08:59:46 -08:00
misc.h
orphan.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
recovery.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
replay.c
sb.c
scan.c
shrinker.c UBIFS: Remove incorrect assertion in shrink_tnc() 2014-07-06 18:57:26 -07:00
super.c UBIFS: remove mst_mutex 2014-11-14 08:59:46 -08:00
tnc_commit.c
tnc_misc.c
tnc.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
ubifs-media.h
ubifs.h UBIFS: remove mst_mutex 2014-11-14 08:59:46 -08:00
xattr.c