ubifs: switch to simple_follow_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
4b8061a67f
commit
0f301bd305
3 changed files with 3 additions and 10 deletions
|
@ -889,6 +889,7 @@ static int ubifs_symlink(struct inode *dir, struct dentry *dentry,
|
||||||
|
|
||||||
memcpy(ui->data, symname, len);
|
memcpy(ui->data, symname, len);
|
||||||
((char *)ui->data)[len] = '\0';
|
((char *)ui->data)[len] = '\0';
|
||||||
|
inode->i_link = ui->data;
|
||||||
/*
|
/*
|
||||||
* The terminating zero byte is not written to the flash media and it
|
* The terminating zero byte is not written to the flash media and it
|
||||||
* is put just to make later in-memory string processing simpler. Thus,
|
* is put just to make later in-memory string processing simpler. Thus,
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
|
|
||||||
#include "ubifs.h"
|
#include "ubifs.h"
|
||||||
#include <linux/mount.h>
|
#include <linux/mount.h>
|
||||||
#include <linux/namei.h>
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
static int read_block(struct inode *inode, void *addr, unsigned int block,
|
static int read_block(struct inode *inode, void *addr, unsigned int block,
|
||||||
|
@ -1300,14 +1299,6 @@ static void ubifs_invalidatepage(struct page *page, unsigned int offset,
|
||||||
ClearPageChecked(page);
|
ClearPageChecked(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *ubifs_follow_link(struct dentry *dentry, struct nameidata *nd)
|
|
||||||
{
|
|
||||||
struct ubifs_inode *ui = ubifs_inode(d_inode(dentry));
|
|
||||||
|
|
||||||
nd_set_link(nd, ui->data);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||||
{
|
{
|
||||||
struct inode *inode = file->f_mapping->host;
|
struct inode *inode = file->f_mapping->host;
|
||||||
|
@ -1570,7 +1561,7 @@ const struct inode_operations ubifs_file_inode_operations = {
|
||||||
|
|
||||||
const struct inode_operations ubifs_symlink_inode_operations = {
|
const struct inode_operations ubifs_symlink_inode_operations = {
|
||||||
.readlink = generic_readlink,
|
.readlink = generic_readlink,
|
||||||
.follow_link = ubifs_follow_link,
|
.follow_link = simple_follow_link,
|
||||||
.setattr = ubifs_setattr,
|
.setattr = ubifs_setattr,
|
||||||
.getattr = ubifs_getattr,
|
.getattr = ubifs_getattr,
|
||||||
.setxattr = ubifs_setxattr,
|
.setxattr = ubifs_setxattr,
|
||||||
|
|
|
@ -195,6 +195,7 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum)
|
||||||
}
|
}
|
||||||
memcpy(ui->data, ino->data, ui->data_len);
|
memcpy(ui->data, ino->data, ui->data_len);
|
||||||
((char *)ui->data)[ui->data_len] = '\0';
|
((char *)ui->data)[ui->data_len] = '\0';
|
||||||
|
inode->i_link = ui->data;
|
||||||
break;
|
break;
|
||||||
case S_IFBLK:
|
case S_IFBLK:
|
||||||
case S_IFCHR:
|
case S_IFCHR:
|
||||||
|
|
Loading…
Reference in a new issue