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]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux