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
..
Kconfig UBIFS: remove Kconfig debugging option 2012-05-16 19:53:46 +03:00
Makefile UBIFS: remove Kconfig debugging option 2012-05-16 19:53:46 +03:00
budget.c No big changes for 3.7 in UBIFS: 2012-10-02 20:47:48 -07:00
commit.c UBIFS: fix a race condition 2014-11-14 08:59:46 -08:00
compress.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
debug.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
debug.h UBIFS: print less 2012-08-31 17:32:58 +03:00
dir.c ubifs: switch to %pd 2013-10-24 23:34:51 -04:00
file.c UBIFS: fix an mmap and fsync race condition 2014-07-06 18:57:26 -07:00
find.c UBIFS: fix mounting problems after power cuts 2012-10-26 16:26:44 +03:00
gc.c UBIFS: remove unnecessary code in ubifs_garbage_collect 2013-10-22 13:34:27 +01:00
io.c UBI: Kill data type hint 2012-05-20 20:25:59 +03:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
journal.c ubifs: switch to %pd 2013-10-24 23:34:51 -04:00
key.h UBIFS: mark unused key objects as invalid 2010-08-30 10:19:08 +03:00
log.c UBIFS: fix free log space calculation 2014-11-14 08:59:46 -08:00
lprops.c UBIFS: introduce categorized lprops counter 2012-10-26 16:00:26 +03:00
lpt.c UBIFS: print less 2012-08-31 17:32:58 +03:00
lpt_commit.c UBIFS: rename random32() to prandom_u32() 2013-01-15 15:45:27 +02:00
master.c UBIFS: remove mst_mutex 2014-11-14 08:59:46 -08:00
misc.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
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 UBIFS: print less 2012-08-31 17:32:58 +03:00
sb.c No big changes for 3.7 in UBIFS: 2012-10-02 20:47:48 -07:00
scan.c UBIFS: comply with coding style 2012-08-31 17:32:57 +03:00
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.c fs/ubifs: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
tnc_commit.c UBIFS: rename random32() to prandom_u32() 2013-01-15 15:45:27 +02:00
tnc_misc.c UBIFS: print less 2012-08-31 17:32:58 +03:00
ubifs-media.h UBIFS: add a superblock flag for free space fix-up 2011-05-16 14:12:14 +03:00
ubifs.h UBIFS: remove mst_mutex 2014-11-14 08:59:46 -08:00
xattr.c ubifs: switch to %pd 2013-10-24 23:34:51 -04:00