hppfs: handle ->put_link()
current code works only because nothing in procfs has non-trivial ->put_link(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
204f2f0e82
commit
7b264fc2be
1 changed files with 12 additions and 6 deletions
|
@ -646,22 +646,27 @@ static const struct super_operations hppfs_sbops = {
|
||||||
static int hppfs_readlink(struct dentry *dentry, char __user *buffer,
|
static int hppfs_readlink(struct dentry *dentry, char __user *buffer,
|
||||||
int buflen)
|
int buflen)
|
||||||
{
|
{
|
||||||
struct dentry *proc_dentry;
|
struct dentry *proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
|
||||||
|
|
||||||
proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
|
|
||||||
return proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer,
|
return proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer,
|
||||||
buflen);
|
buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
|
static void *hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
|
||||||
{
|
{
|
||||||
struct dentry *proc_dentry;
|
struct dentry *proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
|
||||||
|
|
||||||
proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
|
|
||||||
|
|
||||||
return proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd);
|
return proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hppfs_put_link(struct dentry *dentry, struct nameidata *nd,
|
||||||
|
void *cookie)
|
||||||
|
{
|
||||||
|
struct dentry *proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
|
||||||
|
|
||||||
|
if (proc_dentry->d_inode->i_op->put_link)
|
||||||
|
proc_dentry->d_inode->i_op->put_link(proc_dentry, nd, cookie);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct inode_operations hppfs_dir_iops = {
|
static const struct inode_operations hppfs_dir_iops = {
|
||||||
.lookup = hppfs_lookup,
|
.lookup = hppfs_lookup,
|
||||||
};
|
};
|
||||||
|
@ -669,6 +674,7 @@ static const struct inode_operations hppfs_dir_iops = {
|
||||||
static const struct inode_operations hppfs_link_iops = {
|
static const struct inode_operations hppfs_link_iops = {
|
||||||
.readlink = hppfs_readlink,
|
.readlink = hppfs_readlink,
|
||||||
.follow_link = hppfs_follow_link,
|
.follow_link = hppfs_follow_link,
|
||||||
|
.put_link = hppfs_put_link,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
|
static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
|
||||||
|
|
Loading…
Add table
Reference in a new issue