ext4: fix error handling in migrate
authorDmitry Monakhov <dmonakhov@openvz.org>
Mon, 31 May 2010 02:49:31 +0000 (22:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:13 +0000 (10:21 -0700)
commit338ae6b7be4525d210a49c3e0433ff6a1a34f35d
treed07f761502a5dacae194eb7a652f19ec4723212c
parentcc4e25d160d611156c74cfca62f1fe331c07ac62
ext4: fix error handling in migrate

commit f39490bcd1691d65dc33689222a12e1fc13dd824 upstream (as of v2.6.33-git11)

Set i_nlink to zero for temporary inode from very beginning.
otherwise we may fail to start new journal handle and this
inode will be unreferenced but with i_nlink == 1
Since we hold inode reference it can not be pruned.

Also add missed journal_start retval check.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/migrate.c