Re: [PATCH 1/6] vfs: create vfs helper vfs_tmpfile()

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

 



On Mon, Jan 16, 2017 at 3:04 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

> What I tried to do at first is leave d_alloc inside vfs_tmpfile()
> and return dentry, but I did not want this interface to deal with struct file
> as well.

Agreed, I think you should do that.

>
> so do_tmpfile() is very roughly equivalent to:
> path_lookupat()
> mnt_want_write()
> vfs_tmpfile() (including d_alloc)
> dentry_open()
> inode->i_state |= I_LINKABLE
>
> So I can set LINKABLE inside vfs_tmpfile() only if I also pass
> it open_flag

Yes.

> and then it would also happen before open returns
> success.

It doesn't matter.  If open fails the temporary file will be deleted,
dentry, inode and all.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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