Re: [PATCH 1/6] Change inode_operations.mkdir to return struct dentry *

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

 



On Sat, 22 Feb 2025, Al Viro wrote:
> On Fri, Feb 21, 2025 at 10:36:30AM +1100, NeilBrown wrote:
> 
> > +In general, filesystems which use d_instantiate_new() to install the new
> > +inode can safely return NULL.  Filesystems which may not have an I_NEW inode
> > +should use d_drop();d_splice_alias() and return the result of the latter.
> 
> IMO that's a bad pattern, _especially_ if you want to go for "in-update"
> kind of stuff later.

Agreed.  I have a draft patch to change d_splice_alias() and
d_exact_alias() to work on hashed dentrys.  I thought it should go after
these mkdir patches rather than before.

Thanks,
NeilBrown


> 
> That's pretty much the same thing as d_drop()/d_rehash() window.
> 
> We'd be better off dropping that BUG_ON() in d_splice_alias() and teaching
> __d_add() to handle the "it's a hashed negative" case.
> 






[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