gfs2: report "already frozen/thawed" errors
authorBob Peterson <rpeterso@redhat.com>
Thu, 25 Mar 2021 12:51:13 +0000 (08:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Apr 2021 09:43:20 +0000 (11:43 +0200)
commit6c6d58322079f94d58e22eda1166240181ac3270
tree09cd97cfebc9f133ade61ea709e4778fb6c96143
parent870c8df1d192142c1289f38c9278b6b48442f927
gfs2: report "already frozen/thawed" errors

[ Upstream commit ff132c5f93c06bd4432bbab5c369e468653bdec4 ]

Before this patch, gfs2's freeze function failed to report an error
when the target file system was already frozen as it should (and as
generic vfs function freeze_super does. Similarly, gfs2's thaw function
failed to report an error when trying to thaw a file system that is not
frozen, as vfs function thaw_super does. The errors were checked, but
it always returned a 0 return code.

This patch adds the missing error return codes to gfs2 freeze and thaw.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/gfs2/super.c