]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubifs: Check ubifs_wbuf_sync() return code
authorRichard Weinberger <richard@nod.at>
Wed, 17 Jan 2018 18:12:42 +0000 (19:12 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:32 +0000 (21:36 -0400)
commit3e913fca69feb7279e0a8dd71988fe06d2019045
tree4506585ec280e7126195c92b61311d34d3ebf3bc
parent27c07e3cdc0bb455de146b776bb6f3d19850ccd2
ubifs: Check ubifs_wbuf_sync() return code

[ Upstream commit aac17948a7ce01fb60b9ee6cf902967a47b3ce26 ]

If ubifs_wbuf_sync() fails we must not write a master node with the
dirty marker cleared.
Otherwise it is possible that in case of an IO error while syncing we
mark the filesystem as clean and UBIFS refuses to recover upon next
mount.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
fs/ubifs/super.c