]> git.baikalelectronics.ru Git - kernel.git/commit
hypfs: Fix error number left in struct pointer member
authorDavid Howells <dhowells@redhat.com>
Thu, 21 Mar 2019 10:08:08 +0000 (10:08 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 19 Sep 2019 02:43:03 +0000 (22:43 -0400)
commit634a7b14f0597bcd69133ee074dbd2f14c136c7e
tree2f7b2b8290293b90a34a344ae6b119fe6e237695
parent33c97b1e5e3c188064b10bb62f3a5d90ae02973e
hypfs: Fix error number left in struct pointer member

In hypfs_fill_super(), if hypfs_create_update_file() fails,
sbi->update_file is left holding an error number.  This is passed to
hypfs_kill_super() which doesn't check for this.

Fix this by not setting sbi->update_value until after we've checked for
error.

Fixes: 5fdcc9562aa4 ("[PATCH] s390_hypfs filesystem")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
cc: Heiko Carstens <heiko.carstens@de.ibm.com>
cc: linux-s390@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/s390/hypfs/inode.c