lkml.org 
[lkml]   [2023]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ext4: fix WARNING in lock_two_nondirectories
On Mon, Dec 25, 2023 at 09:38:51AM +0800, Baokun Li wrote:

> In my opinion, it doesn't make sense to call lock_two_nondirectories()
> 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.

No. First of all, lock_two_inodes() is a mistake that is going to be
removed in the coming cycle.

What's more, why the hell do you need to lock *anything* to check the
inode type? Inode type never changes, period.

Just take that check prior to lock_two_nondirectories() and be done with
that.

\
 
 \ /
  Last update: 2023-12-25 03:08    [W:6.289 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site