buffer.c: call thaw_super during emergency thaw
authorMateusz Guzik <mguzik@redhat.com>
Tue, 3 Oct 2017 16:17:41 +0000 (18:17 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 19 Mar 2018 06:21:40 +0000 (02:21 -0400)
commit08fdc8a0138afaf324296a342f32ad26ec465e43
treee645f0525576eec37e4eb892aa654f97df9b3b83
parentfa7c1d5080f6e7dc4428210b6eac60271f899908
buffer.c: call thaw_super during emergency thaw

There are 2 distinct freezing mechanisms - one operates on block
devices and another one directly on super blocks. Both end up with the
same result, but thaw of only one of these does not thaw the other.

In particular fsfreeze --freeze uses the ioctl variant going to the
super block. Since prior to this patch emergency thaw was not doing
a relevant thaw, filesystems frozen with this method remained
unaffected.

The patch is a hack which adds blind unfreezing.

In order to keep the super block write-locked the whole time the code
is shuffled around and the newly introduced __iterate_supers is
employed.

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/buffer.c
fs/super.c
include/linux/fs.h