Re: [PATCH] ceph: fail the open_by_handle_at() if the dentry is being unlinked

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

 




On 9/7/23 19:57, Sebastian Hasler wrote:
On 07/09/2023 04:05, Xiubo Li wrote:

int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);

BTW, for "an open file descripter", do you mean "olddirfd" ? Because "olddirfd" is a dir's open file descripter, how is that possible it can become linked again ?

Yes, I mean olddirfd, and the manual says: "If oldpath is an empty string, create a link to the file referenced by olddirfd".

Yeah, in this case will it allow to be a regular file's file descriptor. And in the mannual page:

"This will generally not work if the file  has  a  link  count of  zero  (files  created  with  O_TMPFILE  and without O_EXCL are an exception)."

I haven't gone through the code yet. Is that means we won't allow the linkat() if the inode->i_count is zero ?

Thanks




[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