aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-05-02 10:35:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-05-10 22:18:25 -0400
commit0f301bd3055e86771e7c738ca009afad0964dbd2 (patch)
tree05e78351a9de9f482af518d424c32d07ef0e8c98
parent4b8061a67f67ebd28d4273b05d1b6ae38f2a019b (diff)
ubifs: switch to simple_follow_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/ubifs/dir.c1
-rw-r--r--fs/ubifs/file.c11
-rw-r--r--fs/ubifs/super.c1
3 files changed, 3 insertions, 10 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 27060fc855d4..5c27c66c224a 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -889,6 +889,7 @@ static int ubifs_symlink(struct inode *dir, struct dentry *dentry,
889 889
890 memcpy(ui->data, symname, len); 890 memcpy(ui->data, symname, len);
891 ((char *)ui->data)[len] = '\0'; 891 ((char *)ui->data)[len] = '\0';
892 inode->i_link = ui->data;
892 /* 893 /*
893 * The terminating zero byte is not written to the flash media and it 894 * The terminating zero byte is not written to the flash media and it
894 * is put just to make later in-memory string processing simpler. Thus, 895 * is put just to make later in-memory string processing simpler. Thus,
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 35efc103c39c..a3dfe2ae79f2 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -51,7 +51,6 @@
51 51
52#include "ubifs.h" 52#include "ubifs.h"
53#include <linux/mount.h> 53#include <linux/mount.h>
54#include <linux/namei.h>
55#include <linux/slab.h> 54#include <linux/slab.h>
56 55
57static int read_block(struct inode *inode, void *addr, unsigned int block, 56static 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,
1300 ClearPageChecked(page); 1299 ClearPageChecked(page);
1301} 1300}
1302 1301
1303static void *ubifs_follow_link(struct dentry *dentry, struct nameidata *nd)
1304{
1305 struct ubifs_inode *ui = ubifs_inode(d_inode(dentry));
1306
1307 nd_set_link(nd, ui->data);
1308 return NULL;
1309}
1310
1311int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync) 1302int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
1312{ 1303{
1313 struct inode *inode = file->f_mapping->host; 1304 struct inode *inode = file->f_mapping->host;
@@ -1570,7 +1561,7 @@ const struct inode_operations ubifs_file_inode_operations = {
1570 1561
1571const struct inode_operations ubifs_symlink_inode_operations = { 1562const struct inode_operations ubifs_symlink_inode_operations = {
1572 .readlink = generic_readlink, 1563 .readlink = generic_readlink,
1573 .follow_link = ubifs_follow_link, 1564 .follow_link = simple_follow_link,
1574 .setattr = ubifs_setattr, 1565 .setattr = ubifs_setattr,
1575 .getattr = ubifs_getattr, 1566 .getattr = ubifs_getattr,
1576 .setxattr = ubifs_setxattr, 1567 .setxattr = ubifs_setxattr,
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 75e6f04bb795..20f5dbd7c6a8 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -195,6 +195,7 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum)
195 } 195 }
196 memcpy(ui->data, ino->data, ui->data_len); 196 memcpy(ui->data, ino->data, ui->data_len);
197 ((char *)ui->data)[ui->data_len] = '\0'; 197 ((char *)ui->data)[ui->data_len] = '\0';
198 inode->i_link = ui->data;
198 break; 199 break;
199 case S_IFBLK: 200 case S_IFBLK:
200 case S_IFCHR: 201 case S_IFCHR: