答复: [PATCH] fuse: fix inconsistent status between faccess and mkdir

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

 



we should us d_find_any_alias() rather than d_obtain_alias(), it's my
mistake.

Fuse is support hardlinks, if an inode with two links, we may found wrong
alias, we may need invalidate all dentry, because of the file is not exist
anymore.
But in other kernel code, I didn't see any handling for this situation. I
can't figure out why.

Thanks.

-----邮件原件-----
发件人: Matthew Wilcox <willy@xxxxxxxxxxxxx> 
发送时间: 2021年5月14日 10:27
收件人: Fengnan Chang <changfengnan@xxxxxxxx>
抄送: miklos@xxxxxxxxxx; linux-fsdevel@xxxxxxxxxxxxxxx
主题: Re: [PATCH] fuse: fix inconsistent status between faccess and mkdir

On Fri, May 14, 2021 at 09:55:17AM +0800, Fengnan Chang wrote:
> +++ b/fs/fuse/dir.c
> @@ -1065,6 +1065,14 @@ static int fuse_do_getattr(struct inode *inode,
struct kstat *stat,
>  				fuse_fillattr(inode, &outarg.attr, stat);
>  		}
>  	}
> +	if (err == -ENOENT) {
> +		struct dentry *entry;
> +
> +		entry = d_obtain_alias(inode);

Why d_obtain_alias() instead of d_find_any_alias()?

And what if you find the wrong alias?  ie an inode with two links?
Or does fuse not support hardlinks?






[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