Subject: bug#64821: 30.0.50; write-region errs when overwriting an already open file

From: Eli Zaretskii <[email-masked]>
Date: Thu, 27 Jul 2023 19:31:30 +0300

> From: Mattias Engdegård <[email-masked]>
> Date: Thu, 27 Jul 2023 17:07:26 +0200
> Cc: Ihor Radchenko <[email-masked]>,
>  [email-masked]
> 
> The change on master (8955853368) causes filelock-tests to fail; see attached log.
> This is on macOS with an out-of-tree build.

Sorry, I cannot reproduce this on any system to which I have access.
Would you mind running the failing test under Edebug and telling which
part in userlock.el signals an error, and why?  Is that this line:

          (with-current-buffer (get-file-buffer (file-truename filename))
            (set-visited-file-modtime))

If so, does it mean file-truename returns nil?