android_kernel_google_msm/fs/ubifs
Artem Bityutskiy 82508e0f0b 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: Zefan Li <lizefan@huawei.com>
2015-02-02 17:04:36 +08:00
..
budget.c writeback: Add a 'reason' to wb_writeback_work 2011-10-31 00:33:36 +08:00
commit.c UBIFS: fix a race condition 2015-02-02 17:04:36 +08:00
compress.c
debug.c UBIFS: make the dbg_lock spinlock static 2012-02-29 16:10:20 +02:00
debug.h UBIFS: fix complaints about too small debug buffer size 2012-09-14 10:00:17 -07:00
dir.c UBIFS: fix a horrid bug 2013-07-03 10:59:05 -07:00
file.c ubifs: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:26 +08:00
find.c UBIFS: fix mounting problems after power cuts 2012-11-26 11:37:44 -08:00
gc.c UBIFS: synchronize write-buffer before switching to the next bud 2011-05-16 10:31:41 +03:00
io.c UBIFS: remove custom list of superblocks 2011-07-04 10:54:33 +03:00
ioctl.c vfs: mnt_drop_write_file() 2012-01-03 22:52:40 -05:00
journal.c UBIFS: fix key printing 2012-01-13 12:50:42 +02:00
Kconfig UBIFS: do not select KALLSYMS_ALL 2011-04-05 10:45:45 +03:00
key.h
log.c UBIFS: fix free log space calculation 2015-02-02 17:04:36 +08:00
lprops.c UBIFS: introduce categorized lprops counter 2012-11-26 11:37:44 -08:00
lpt.c UBIFS: Use kmemdup rather than duplicating its implementation 2011-11-22 10:58:48 +02:00
lpt_commit.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
Makefile
master.c UBIFS: remove mst_mutex 2015-02-02 17:04:35 +08:00
misc.h UBIFS: introduce more I/O helpers 2011-07-04 10:54:33 +03:00
orphan.c UBIFS: fix double free of ubifs_orphan objects 2014-03-11 16:10:05 -07:00
recovery.c UBIFS: amend recovery debugging message 2012-02-29 16:10:20 +02:00
replay.c UBIFS: fix key printing 2012-01-13 12:50:42 +02:00
sb.c UBIFS: fix a bug in empty space fix-up 2012-07-29 08:04:20 -07:00
scan.c UBIFS: switch to ubifs_leb_read 2011-07-04 10:54:33 +03:00
shrinker.c UBIFS: Remove incorrect assertion in shrink_tnc() 2014-07-06 18:49:19 -07:00
super.c UBIFS: remove mst_mutex 2015-02-02 17:04:35 +08:00
tnc.c Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6 2012-01-13 10:31:33 -08:00
tnc_commit.c UBIFS: lessen amount of debugging check types 2011-07-04 10:54:28 +03:00
tnc_misc.c UBIFS: fix key printing 2012-01-13 12:50:42 +02: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 2015-02-02 17:04:35 +08:00
xattr.c UBIFS: Use kmemdup rather than duplicating its implementation 2011-11-22 10:58:48 +02:00