[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170302170657.GI17411@redhat.com>
Date: Thu, 2 Mar 2017 12:06:57 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: James Bottomley <James.Bottomley@...senPartnership.com>
Cc: Djalal Harouni <tixxdz@...il.com>, Chris Mason <clm@...com>,
Theodore Tso <tytso@....edu>,
Josh Triplett <josh@...htriplett.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andy Lutomirski <luto@...nel.org>,
Seth Forshee <seth.forshee@...onical.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
Dongsu Park <dongsu@...ocode.com>,
David Herrmann <dh.herrmann@...glemail.com>,
Miklos Szeredi <mszeredi@...hat.com>,
Alban Crequy <alban.crequy@...il.com>,
Al Viro <viro@...IV.linux.org.uk>,
"Serge E. Hallyn" <serge@...lyn.com>,
Phil Estes <estesp@...il.com>,
Amir Goldstein <amir73il@...il.com>
Subject: Re: [RFC v2 1/1] shiftfs: uid/gid shifting bind mount
On Mon, Feb 20, 2017 at 04:47:05PM -0800, James Bottomley wrote:
[..]
> +static int shiftfs_readlink(struct dentry *dentry, char __user *data,
> + int flags)
> +{
> + struct dentry *real = dentry->d_fsdata;
> + const struct inode_operations *iop = real->d_inode->i_op;
> +
> + if (iop->readlink)
> + return iop->readlink(real, data, flags);
> +
> + return -EINVAL;
> +}
> +
Hi James,
I was testing shiftfs on top of xfs and noticed readlink() is failing as
xfs does not define readlink.
Following patch fixes it for me.
Vivek
---
fs/shiftfs.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
Index: rhvgoyal-linux/fs/shiftfs.c
===================================================================
--- rhvgoyal-linux.orig/fs/shiftfs.c 2017-02-28 11:07:04.360579594 -0500
+++ rhvgoyal-linux/fs/shiftfs.c 2017-03-02 11:59:17.484345405 -0500
@@ -179,12 +179,8 @@ static int shiftfs_readlink(struct dentr
int flags)
{
struct dentry *real = dentry->d_fsdata;
- const struct inode_operations *iop = real->d_inode->i_op;
- if (iop->readlink)
- return iop->readlink(real, data, flags);
-
- return -EINVAL;
+ return vfs_readlink(real, data, flags);
}
static const char *shiftfs_get_link(struct dentry *dentry, struct inode *inode,
Powered by blists - more mailing lists