Re: buggered I_CREATING implementation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2025 at 05:15:47PM +0200, Mateusz Guzik wrote:

> So as far as I understand the intent was to make it so that discarded
> inodes can be tested for with:
> 	(inode->i_state & (I_NEW | I_CREATING) == I_CREATING)

It is not the intent.  The problem is dealing with incoming fhandle that
has guessed the inumber of freshly created (and not yet linked) inode.

> This means another call for the same inode will find it and:
> 
>                 if (unlikely(old->i_state & I_CREATING)) {
>                         spin_unlock(&old->i_lock);
>                         spin_unlock(&inode_hash_lock);
>                         return -EBUSY;
>                 }
> 
> ... return with -EBUSY instead of waiting to check what will happen with it.

What's there to wait for?




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux