From: Richard Weinberger <richard@nod.at>
To: Toshikuni Fukaya <toshiq2@gmail.com>,
user-mode-linux-devel@lists.sourceforge.net
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
David Howells <dhowells@redhat.com>,
jdike@addtoit.com, Al Viro <viro@zeniv.linux.org.uk>,
mszeredi@redhat.com
Subject: Re: [uml-devel] [PATCH] hostfs: fix opening file with overlayfs
Date: Sun, 1 May 2016 22:21:33 +0200 [thread overview]
Message-ID: <5726654D.1070500@nod.at> (raw)
In-Reply-To: <1462093338-8759-1-git-send-email-toshiq2@gmail.com>
CC'ing VFS folks
Am 01.05.2016 um 11:02 schrieb Toshikuni Fukaya:
> If a file on overlayfs using hostfs as a lowerdir is opened, it would
> be failed by ENOENT because hostfs resolves a host path by a host root
> path stored on the hostfs superblock referred by file->f_path.dentry,
> but it is replaced with overlayfs's one starting from the
> commit 4bacc9c9234c ("overlayfs: Make f_path always point to the
> overlay and f_inode to the underlay").
>
> We replace using file->f_path.dentry directly with calling
> "file_dentry" from a commit d101a125954e ("fs: add file_dentry()") to
> fix the issue.
Is there a reason why not all instances of file->f_path.dentry have
been replaced by file_dentry()?
I smell more fallout...
Thanks,
//richard
> Signed-off-by: Toshikuni Fukaya <toshiq2@gmail.com>
> ---
> fs/hostfs/hostfs_kern.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
> index 7016653..26a9f43 100644
> --- a/fs/hostfs/hostfs_kern.c
> +++ b/fs/hostfs/hostfs_kern.c
> @@ -284,7 +284,7 @@ static int hostfs_readdir(struct file *file, struct dir_context *ctx)
> int error, len;
> unsigned int type;
>
> - name = dentry_name(file->f_path.dentry);
> + name = dentry_name(file_dentry(file));
> if (name == NULL)
> return -ENOMEM;
> dir = open_dir(name, &error);
> @@ -323,7 +323,7 @@ retry:
> if (mode & FMODE_WRITE)
> r = w = 1;
>
> - name = dentry_name(file->f_path.dentry);
> + name = dentry_name(file_dentry(file));
> if (name == NULL)
> return -ENOMEM;
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
parent reply other threads:[~2016-05-01 20:21 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1462093338-8759-1-git-send-email-toshiq2@gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5726654D.1070500@nod.at \
--to=richard@nod.at \
--cc=dhowells@redhat.com \
--cc=jdike@addtoit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=toshiq2@gmail.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).