do_last(): simplify the liveness analysis past finish_open_created
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 26 Jan 2020 15:38:17 +0000 (10:38 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Mar 2020 01:09:13 +0000 (21:09 -0400)
commit8795e7d48288163ce29eb927240a0c32c40b4d54
tree9e53d747bcfcb14d5a45e4e54dcbeeca06b8d55d
parent5a2d3edd8dad8c8870419c614e3a7449effe87cb
do_last(): simplify the liveness analysis past finish_open_created

Don't mess with got_write there - it is guaranteed to be false on
entry and it will be set true if and only if we decide to go for
truncation and manage to get write access for that.

Don't carry acc_mode through the entire thing - it's only used
in that part.  And don't bother with gotos in there - compiler is
quite capable of optimizing that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c