libio: Avoid RMW of flags2 outside lock (BZ #27842)

Remove an unconditional RMW on flags2 in flockfile - we don't need to change
_IO_FLAGS2_NEED_LOCK since it isn't used in flockfile or funlockfile.
This fixes BZ #27842.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Wilco Dijkstra 2022-06-10 13:33:26 +01:00 committed by Wilco Dijkstra
parent cffb9414c5
commit f107b7b30d
1 changed files with 0 additions and 1 deletions

View File

@ -22,7 +22,6 @@
void
__flockfile (FILE *stream)
{
stream->_flags2 |= _IO_FLAGS2_NEED_LOCK;
_IO_lock_lock (*stream->_lock);
}
weak_alias (__flockfile, flockfile);