On Mon, Dec 25, 2023 at 09:38:51AM +0800, Baokun Li wrote:Okay, I didn't know about this.
In my opinion, it doesn't make sense to call lock_two_nondirectories()No. First of all, lock_two_inodes() is a mistake that is going to be
here to determine if the inode is a regular file or not, since the logic
for dealing with non-regular files comes after the locking, so calling
lock_two_inodes() directly here will suffice.
removed in the coming cycle.
What's more, why the hell do you need to lock *anything* to check theSince in the current logic we update the boot loader file via
inode type? Inode type never changes, period.
Just take that check prior to lock_two_nondirectories() and be done with
that.