diff options
| author | Sheng Yong <shengyong1@huawei.com> | 2015-03-04 10:46:16 +0000 |
|---|---|---|
| committer | Matt Wagantall <mattw@codeaurora.org> | 2015-08-21 11:09:36 -0700 |
| commit | 476817da6a566a0aed1b5d2614f6f2c81bd7d2f9 (patch) | |
| tree | fd2e8eb1d3db4424f644906cc2ed418b20a707ae /fs/ubifs/commit.c | |
| parent | 92736294991c921e20e6624c91d3f9c5d55c942b (diff) | |
UBIFS: do not write master node if need recovery
The commits 781c571 ("UBIFS: intialize LPT earlier") and 0980119 ("UBIFS:
fix-up free space earlier") move some initialization before marking the
master node dirty. But the modification changes the conditions of writing
master.
If unclean umount happens, ubifs may fail when mounting. But trying to
mount it will write new master nodes on the flash. This is useless but
increasing sqnum. So check need_recovery before writing master node, and
don't create new master node if filesystem needs recovery.
The behavour of the bug shows at:
http://lists.infradead.org/pipermail/linux-mtd/2015-February/057712.html
Change-Id: I6ca2154ee79f5eedb0ca769df8739662d34cac0b
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Git-commit: 2c84599ca4c2ffd81301f23eabc69c5180ff2f64
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
Diffstat (limited to 'fs/ubifs/commit.c')
0 files changed, 0 insertions, 0 deletions
