]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ncpfs: fix error paths and goto statements in ncp_fill_super()
authorDjalal Harouni <tixxdz@opendz.org>
Tue, 13 Dec 2011 01:47:29 +0000 (02:47 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 14 Dec 2011 05:45:33 +0000 (00:45 -0500)
commitec8bc8dd5712fa8e4dc3b81b0d77d0548e723d5b
tree9a054b2e2993dafd4bc87871192afdf532e09ad6
parent1752ed896857c290791563d0a9ae3c32f5b4c5d6
fs/ncpfs: fix error paths and goto statements in ncp_fill_super()

The label 'out_bdi' should be followed by bdi_destroy() instead of
fput() which should be after the 'out_fput' label.

If bdi_setup_and_register() fails then jump to the 'out_fput' label
instead of the 'out_bdi' one.

If fget(data.info_fd) fails then jump to the previously fixed 'out_bdi'
label to call bdi_destroy() otherwise the bdi object will not be
destroyed.

Compile tested only.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ncpfs/inode.c