]> git.baikalelectronics.ru Git - kernel.git/commit
jfs: clean up jfs_rename and fix out of order unlock
authorDave Kleikamp <dave.kleikamp@oracle.com>
Wed, 15 Jul 2015 17:52:47 +0000 (12:52 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Wed, 15 Jul 2015 19:11:30 +0000 (14:11 -0500)
commit9d317c308965701a25c669cce3c9f71aee5433df
tree2228980d70a85410beb6b473a8fb58b31a882fbc
parente349245e1e9774bd45803223b14db8050ea9315d
jfs: clean up jfs_rename and fix out of order unlock

The end of jfs_rename(), which is also used by the error paths,
included a call to IWRITE_UNLOCK(new_ip) after labels out1, out2
and out3. If we come in through these labels, IWRITE_LOCK() has not
been called yet.

In moving that call to the correct spot, I also moved some
exceptional truncate code earlier as well, since the early error
paths don't need to deal with it, and I renamed out4: to out_tx: so
a future patch by Jan Kara doesn't need to deal with renumbering or
confusing out-of-order labels.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
fs/jfs/namei.c