]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:47:49 +0000 (11:47 -0400)
commita43a7e7337a752d80fad5696208c0988e6bee54f
tree534783307f86f9603947a2d8242801cd0962867b
parent53d186416697f5119926fd78e4e87b9af830e287
ubifs: Check ubifs_wbuf_sync() return code

BugLink: http://bugs.launchpad.net/bugs/1773233
commit aac17948a7ce01fb60b9ee6cf902967a47b3ce26 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/ubifs/super.c