aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/configfs/symlink.c2
-rw-r--r--fs/f2fs/namei.c2
-rw-r--r--fs/fuse/dir.c2
-rw-r--r--fs/hostfs/hostfs_kern.c2
-rw-r--r--fs/hppfs/hppfs.c8
-rw-r--r--fs/kernfs/symlink.c2
-rw-r--r--fs/libfs.c2
-rw-r--r--fs/namei.c13
-rw-r--r--fs/overlayfs/inode.c4
-rw-r--r--fs/proc/inode.c2
10 files changed, 20 insertions, 19 deletions
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index 0ace75649009..bc464c26e00e 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -296,7 +296,7 @@ static const char *configfs_follow_link(struct dentry *dentry, void **cookie)
296 return ERR_PTR(error); 296 return ERR_PTR(error);
297} 297}
298 298
299static void configfs_put_link(struct dentry *dentry, void *cookie) 299static void configfs_put_link(struct inode *unused, void *cookie)
300{ 300{
301 free_page((unsigned long)cookie); 301 free_page((unsigned long)cookie);
302} 302}
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index cd05a7c91533..71765d062914 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -301,7 +301,7 @@ static const char *f2fs_follow_link(struct dentry *dentry, void **cookie)
301 const char *link = page_follow_link_light(dentry, cookie); 301 const char *link = page_follow_link_light(dentry, cookie);
302 if (!IS_ERR(link) && !*link) { 302 if (!IS_ERR(link) && !*link) {
303 /* this is broken symlink case */ 303 /* this is broken symlink case */
304 page_put_link(dentry, *cookie); 304 page_put_link(NULL, *cookie);
305 link = ERR_PTR(-ENOENT); 305 link = ERR_PTR(-ENOENT);
306 } 306 }
307 return link; 307 return link;
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index d5cdef8b7f3a..9e704c124392 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1395,7 +1395,7 @@ static const char *fuse_follow_link(struct dentry *dentry, void **cookie)
1395 return link; 1395 return link;
1396} 1396}
1397 1397
1398static void fuse_put_link(struct dentry *dentry, void *cookie) 1398static void fuse_put_link(struct inode *unused, void *cookie)
1399{ 1399{
1400 free_page((unsigned long) cookie); 1400 free_page((unsigned long) cookie);
1401} 1401}
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 7b6ed7a908f6..4a437ab5f296 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -915,7 +915,7 @@ static const char *hostfs_follow_link(struct dentry *dentry, void **cookie)
915 return *cookie = link; 915 return *cookie = link;
916} 916}
917 917
918static void hostfs_put_link(struct dentry *dentry, void *cookie) 918static void hostfs_put_link(struct inode *unused, void *cookie)
919{ 919{
920 __putname(cookie); 920 __putname(cookie);
921} 921}
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index 15a774eb5bbf..2867837909a9 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -649,12 +649,12 @@ static const char *hppfs_follow_link(struct dentry *dentry, void **cookie)
649 return d_inode(proc_dentry)->i_op->follow_link(proc_dentry, cookie); 649 return d_inode(proc_dentry)->i_op->follow_link(proc_dentry, cookie);
650} 650}
651 651
652static void hppfs_put_link(struct dentry *dentry, void *cookie) 652static void hppfs_put_link(struct inode *inode, void *cookie)
653{ 653{
654 struct dentry *proc_dentry = HPPFS_I(d_inode(dentry))->proc_dentry; 654 struct inode *proc_inode = d_inode(HPPFS_I(inode)->proc_dentry);
655 655
656 if (d_inode(proc_dentry)->i_op->put_link) 656 if (proc_inode->i_op->put_link)
657 d_inode(proc_dentry)->i_op->put_link(proc_dentry, cookie); 657 proc_inode->i_op->put_link(proc_inode, cookie);
658} 658}
659 659
660static const struct inode_operations hppfs_dir_iops = { 660static const struct inode_operations hppfs_dir_iops = {
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index 366c5a17475e..f6aa2e5a76b4 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -126,7 +126,7 @@ static const char *kernfs_iop_follow_link(struct dentry *dentry, void **cookie)
126 return *cookie = (char *)page; 126 return *cookie = (char *)page;
127} 127}
128 128
129static void kernfs_iop_put_link(struct dentry *dentry, void *cookie) 129static void kernfs_iop_put_link(struct inode *unused, void *cookie)
130{ 130{
131 free_page((unsigned long)cookie); 131 free_page((unsigned long)cookie);
132} 132}
diff --git a/fs/libfs.c b/fs/libfs.c
index c5f3373e326b..01c337b0fec8 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1024,7 +1024,7 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
1024} 1024}
1025EXPORT_SYMBOL(noop_fsync); 1025EXPORT_SYMBOL(noop_fsync);
1026 1026
1027void kfree_put_link(struct dentry *dentry, void *cookie) 1027void kfree_put_link(struct inode *unused, void *cookie)
1028{ 1028{
1029 kfree(cookie); 1029 kfree(cookie);
1030} 1030}
diff --git a/fs/namei.c b/fs/namei.c
index 0fa7af23cff6..43034046a0e1 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -749,7 +749,7 @@ static inline void put_link(struct nameidata *nd)
749 struct saved *last = nd->stack + --nd->depth; 749 struct saved *last = nd->stack + --nd->depth;
750 struct inode *inode = last->inode; 750 struct inode *inode = last->inode;
751 if (last->cookie && inode->i_op->put_link) 751 if (last->cookie && inode->i_op->put_link)
752 inode->i_op->put_link(last->link.dentry, last->cookie); 752 inode->i_op->put_link(inode, last->cookie);
753 path_put(&last->link); 753 path_put(&last->link);
754} 754}
755 755
@@ -4444,17 +4444,18 @@ EXPORT_SYMBOL(readlink_copy);
4444int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) 4444int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
4445{ 4445{
4446 void *cookie; 4446 void *cookie;
4447 const char *link = dentry->d_inode->i_link; 4447 struct inode *inode = d_inode(dentry);
4448 const char *link = inode->i_link;
4448 int res; 4449 int res;
4449 4450
4450 if (!link) { 4451 if (!link) {
4451 link = dentry->d_inode->i_op->follow_link(dentry, &cookie); 4452 link = inode->i_op->follow_link(dentry, &cookie);
4452 if (IS_ERR(link)) 4453 if (IS_ERR(link))
4453 return PTR_ERR(link); 4454 return PTR_ERR(link);
4454 } 4455 }
4455 res = readlink_copy(buffer, buflen, link); 4456 res = readlink_copy(buffer, buflen, link);
4456 if (dentry->d_inode->i_op->put_link) 4457 if (inode->i_op->put_link)
4457 dentry->d_inode->i_op->put_link(dentry, cookie); 4458 inode->i_op->put_link(inode, cookie);
4458 return res; 4459 return res;
4459} 4460}
4460EXPORT_SYMBOL(generic_readlink); 4461EXPORT_SYMBOL(generic_readlink);
@@ -4496,7 +4497,7 @@ const char *page_follow_link_light(struct dentry *dentry, void **cookie)
4496} 4497}
4497EXPORT_SYMBOL(page_follow_link_light); 4498EXPORT_SYMBOL(page_follow_link_light);
4498 4499
4499void page_put_link(struct dentry *dentry, void *cookie) 4500void page_put_link(struct inode *unused, void *cookie)
4500{ 4501{
4501 struct page *page = cookie; 4502 struct page *page = cookie;
4502 kunmap(page); 4503 kunmap(page);
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 9986833c9fcc..308379b2d0b2 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -174,7 +174,7 @@ static const char *ovl_follow_link(struct dentry *dentry, void **cookie)
174 return ret; 174 return ret;
175} 175}
176 176
177static void ovl_put_link(struct dentry *dentry, void *c) 177static void ovl_put_link(struct inode *unused, void *c)
178{ 178{
179 struct inode *realinode; 179 struct inode *realinode;
180 struct ovl_link_data *data = c; 180 struct ovl_link_data *data = c;
@@ -183,7 +183,7 @@ static void ovl_put_link(struct dentry *dentry, void *c)
183 return; 183 return;
184 184
185 realinode = data->realdentry->d_inode; 185 realinode = data->realdentry->d_inode;
186 realinode->i_op->put_link(data->realdentry, data->cookie); 186 realinode->i_op->put_link(realinode, data->cookie);
187 kfree(data); 187 kfree(data);
188} 188}
189 189
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index eb35874fe09c..afe232b9df6e 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -402,7 +402,7 @@ static const char *proc_follow_link(struct dentry *dentry, void **cookie)
402 return pde->data; 402 return pde->data;
403} 403}
404 404
405static void proc_put_link(struct dentry *dentry, void *p) 405static void proc_put_link(struct inode *unused, void *p)
406{ 406{
407 unuse_pde(p); 407 unuse_pde(p);
408} 408}