]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6e00a07798b83e3b01e66d5fb5e641c631696b7f
tree9e53d747bcfcb14d5a45e4e54dcbeeca06b8d55d
parent91adac1ce6d57d84a13a8c1ba57caf4a8bb4de22
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