Re: [PATCH 4/6] fuse: return correct dentry for ->mkdir

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

 



On Mon, Feb 24, 2025 at 01:26:18PM +1100, NeilBrown wrote:

> Probably now.  It would require S_IFDIR to be passed in the mode to
> vfs_mknod().  I don't think any current callers do that, but I don't see
> any code in vfs_mknod() to prevent it.

Not allowed (and that's caller's responsibility to enforce).  Local filesystems
would break horribly if that ever happened.

->mknod() instance _may_ be a convenient helper for ->mkdir() et.al. to call,
but even for ramfs it won't coincide with ->mkdir() (wrong i_nlink, for one
thing).

If that's not documented, it really should be.

vfs_mknod() may be called for block devices, character devices, FIFOs and
sockets.  Nothing else is allowed.




[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