[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1473708559-12714-6-git-send-email-mszeredi@redhat.com>
Date: Mon, 12 Sep 2016 21:29:07 +0200
From: Miklos Szeredi <mszeredi@...hat.com>
To: linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 05/17] bad_inode: use generic_readlink
This will allow us to move the generic readlink logic into the VFS and get
rid of the readlink method.
If inode has i_link set then this patch changes behavior, because
generic_readlink will return the cached contents instead of calling
i_op->get_link. It would be hard to imagine that this change could break
userspace in any sane setup, though.
Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
---
fs/bad_inode.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index b8db8531e837..7cf1f445fe04 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -78,12 +78,6 @@ static int bad_inode_rename2(struct inode *old_dir, struct dentry *old_dentry,
return -EIO;
}
-static int bad_inode_readlink(struct dentry *dentry, char __user *buffer,
- int buflen)
-{
- return -EIO;
-}
-
static int bad_inode_permission(struct inode *inode, int mask)
{
return -EIO;
@@ -178,7 +172,7 @@ static const struct inode_operations bad_inode_ops =
.rmdir = bad_inode_rmdir,
.mknod = bad_inode_mknod,
.rename2 = bad_inode_rename2,
- .readlink = bad_inode_readlink,
+ .readlink = generic_readlink,
.permission = bad_inode_permission,
.getattr = bad_inode_getattr,
.setattr = bad_inode_setattr,
--
2.5.5
Powered by blists - more mailing lists