aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-08-19 19:17:39 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-19 21:08:21 -0400
commit008b150a3c4d971cd65d02d107b8fcc860bc959c (patch)
tree8594c24dbb13dc253f41ef885a8ac899f0e434c1
parentcc314eef0128a807e50fa03baf2d0abc0647952c (diff)
[PATCH] Fix up symlink function pointers
This fixes up the symlink functions for the calling convention change: * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs, smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link() * befs, smbfs, xfs - same for ->put_link() Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/afs/mntpt.c8
-rw-r--r--fs/autofs4/symlink.c4
-rw-r--r--fs/befs/linuxvfs.c8
-rw-r--r--fs/devfs/base.c4
-rw-r--r--fs/freevxfs/vxfs_immed.c4
-rw-r--r--fs/jffs2/symlink.c6
-rw-r--r--fs/jfs/symlink.c4
-rw-r--r--fs/proc/base.c8
-rw-r--r--fs/proc/generic.c4
-rw-r--r--fs/smbfs/symlink.c6
-rw-r--r--fs/sysv/symlink.c4
-rw-r--r--fs/ufs/symlink.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c10
13 files changed, 37 insertions, 37 deletions
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index bfc28abe1cb1..31ee06590de5 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -30,7 +30,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir,
30 struct dentry *dentry, 30 struct dentry *dentry,
31 struct nameidata *nd); 31 struct nameidata *nd);
32static int afs_mntpt_open(struct inode *inode, struct file *file); 32static int afs_mntpt_open(struct inode *inode, struct file *file);
33static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd); 33static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
34 34
35struct file_operations afs_mntpt_file_operations = { 35struct file_operations afs_mntpt_file_operations = {
36 .open = afs_mntpt_open, 36 .open = afs_mntpt_open,
@@ -233,7 +233,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
233/* 233/*
234 * follow a link from a mountpoint directory, thus causing it to be mounted 234 * follow a link from a mountpoint directory, thus causing it to be mounted
235 */ 235 */
236static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) 236static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
237{ 237{
238 struct vfsmount *newmnt; 238 struct vfsmount *newmnt;
239 struct dentry *old_dentry; 239 struct dentry *old_dentry;
@@ -249,7 +249,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
249 newmnt = afs_mntpt_do_automount(dentry); 249 newmnt = afs_mntpt_do_automount(dentry);
250 if (IS_ERR(newmnt)) { 250 if (IS_ERR(newmnt)) {
251 path_release(nd); 251 path_release(nd);
252 return PTR_ERR(newmnt); 252 return (void *)newmnt;
253 } 253 }
254 254
255 old_dentry = nd->dentry; 255 old_dentry = nd->dentry;
@@ -267,7 +267,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
267 } 267 }
268 268
269 kleave(" = %d", err); 269 kleave(" = %d", err);
270 return err; 270 return ERR_PTR(err);
271} /* end afs_mntpt_follow_link() */ 271} /* end afs_mntpt_follow_link() */
272 272
273/*****************************************************************************/ 273/*****************************************************************************/
diff --git a/fs/autofs4/symlink.c b/fs/autofs4/symlink.c
index c265a66edf0f..2ea2c98fd84b 100644
--- a/fs/autofs4/symlink.c
+++ b/fs/autofs4/symlink.c
@@ -12,11 +12,11 @@
12 12
13#include "autofs_i.h" 13#include "autofs_i.h"
14 14
15static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) 15static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
16{ 16{
17 struct autofs_info *ino = autofs4_dentry_ino(dentry); 17 struct autofs_info *ino = autofs4_dentry_ino(dentry);
18 nd_set_link(nd, (char *)ino->u.symlink); 18 nd_set_link(nd, (char *)ino->u.symlink);
19 return 0; 19 return NULL;
20} 20}
21 21
22struct inode_operations autofs4_symlink_inode_operations = { 22struct inode_operations autofs4_symlink_inode_operations = {
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index de5bb280a828..abf950e5b647 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -41,8 +41,8 @@ static struct inode *befs_alloc_inode(struct super_block *sb);
41static void befs_destroy_inode(struct inode *inode); 41static void befs_destroy_inode(struct inode *inode);
42static int befs_init_inodecache(void); 42static int befs_init_inodecache(void);
43static void befs_destroy_inodecache(void); 43static void befs_destroy_inodecache(void);
44static int befs_follow_link(struct dentry *, struct nameidata *); 44static void *befs_follow_link(struct dentry *, struct nameidata *);
45static void befs_put_link(struct dentry *, struct nameidata *); 45static void befs_put_link(struct dentry *, struct nameidata *, void *);
46static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, 46static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
47 char **out, int *out_len); 47 char **out, int *out_len);
48static int befs_nls2utf(struct super_block *sb, const char *in, int in_len, 48static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
@@ -487,10 +487,10 @@ befs_follow_link(struct dentry *dentry, struct nameidata *nd)
487 } 487 }
488 488
489 nd_set_link(nd, link); 489 nd_set_link(nd, link);
490 return 0; 490 return NULL;
491} 491}
492 492
493static void befs_put_link(struct dentry *dentry, struct nameidata *nd) 493static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
494{ 494{
495 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); 495 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
496 if (befs_ino->i_flags & BEFS_LONG_SYMLINK) { 496 if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
diff --git a/fs/devfs/base.c b/fs/devfs/base.c
index 1ecfe1f184d4..8b679b67e5e0 100644
--- a/fs/devfs/base.c
+++ b/fs/devfs/base.c
@@ -2491,11 +2491,11 @@ static int devfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
2491 return 0; 2491 return 0;
2492} /* End Function devfs_mknod */ 2492} /* End Function devfs_mknod */
2493 2493
2494static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd) 2494static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
2495{ 2495{
2496 struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); 2496 struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode);
2497 nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); 2497 nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV));
2498 return 0; 2498 return NULL;
2499} /* End Function devfs_follow_link */ 2499} /* End Function devfs_follow_link */
2500 2500
2501static struct inode_operations devfs_iops = { 2501static struct inode_operations devfs_iops = {
diff --git a/fs/freevxfs/vxfs_immed.c b/fs/freevxfs/vxfs_immed.c
index ac677ab262b2..b20c3efa364b 100644
--- a/fs/freevxfs/vxfs_immed.c
+++ b/fs/freevxfs/vxfs_immed.c
@@ -38,7 +38,7 @@
38#include "vxfs_inode.h" 38#include "vxfs_inode.h"
39 39
40 40
41static int vxfs_immed_follow_link(struct dentry *, struct nameidata *); 41static void * vxfs_immed_follow_link(struct dentry *, struct nameidata *);
42 42
43static int vxfs_immed_readpage(struct file *, struct page *); 43static int vxfs_immed_readpage(struct file *, struct page *);
44 44
@@ -77,7 +77,7 @@ vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np)
77{ 77{
78 struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode); 78 struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode);
79 nd_set_link(np, vip->vii_immed.vi_immed); 79 nd_set_link(np, vip->vii_immed.vi_immed);
80 return 0; 80 return NULL;
81} 81}
82 82
83/** 83/**
diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c
index 073633e11ea9..82ef484f5e12 100644
--- a/fs/jffs2/symlink.c
+++ b/fs/jffs2/symlink.c
@@ -18,7 +18,7 @@
18#include <linux/namei.h> 18#include <linux/namei.h>
19#include "nodelist.h" 19#include "nodelist.h"
20 20
21static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); 21static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
22 22
23struct inode_operations jffs2_symlink_inode_operations = 23struct inode_operations jffs2_symlink_inode_operations =
24{ 24{
@@ -27,7 +27,7 @@ struct inode_operations jffs2_symlink_inode_operations =
27 .setattr = jffs2_setattr 27 .setattr = jffs2_setattr
28}; 28};
29 29
30static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) 30static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
31{ 31{
32 struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode); 32 struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode);
33 char *p = (char *)f->dents; 33 char *p = (char *)f->dents;
@@ -60,6 +60,6 @@ static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
60 * since the only way that may cause f->dents to be changed is iput() operation. 60 * since the only way that may cause f->dents to be changed is iput() operation.
61 * But VFS will not use f->dents after iput() has been called. 61 * But VFS will not use f->dents after iput() has been called.
62 */ 62 */
63 return 0; 63 return NULL;
64} 64}
65 65
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c
index 287d8d6c3cfd..16477b3835e1 100644
--- a/fs/jfs/symlink.c
+++ b/fs/jfs/symlink.c
@@ -22,11 +22,11 @@
22#include "jfs_inode.h" 22#include "jfs_inode.h"
23#include "jfs_xattr.h" 23#include "jfs_xattr.h"
24 24
25static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) 25static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
26{ 26{
27 char *s = JFS_IP(dentry->d_inode)->i_inline; 27 char *s = JFS_IP(dentry->d_inode)->i_inline;
28 nd_set_link(nd, s); 28 nd_set_link(nd, s);
29 return 0; 29 return NULL;
30} 30}
31 31
32struct inode_operations jfs_symlink_inode_operations = { 32struct inode_operations jfs_symlink_inode_operations = {
diff --git a/fs/proc/base.c b/fs/proc/base.c
index ace151fa4878..491f2d9f89ac 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -890,7 +890,7 @@ static struct file_operations proc_seccomp_operations = {
890}; 890};
891#endif /* CONFIG_SECCOMP */ 891#endif /* CONFIG_SECCOMP */
892 892
893static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) 893static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
894{ 894{
895 struct inode *inode = dentry->d_inode; 895 struct inode *inode = dentry->d_inode;
896 int error = -EACCES; 896 int error = -EACCES;
@@ -907,7 +907,7 @@ static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
907 error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt); 907 error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt);
908 nd->last_type = LAST_BIND; 908 nd->last_type = LAST_BIND;
909out: 909out:
910 return error; 910 return ERR_PTR(error);
911} 911}
912 912
913static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt, 913static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt,
@@ -1692,11 +1692,11 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
1692 return vfs_readlink(dentry,buffer,buflen,tmp); 1692 return vfs_readlink(dentry,buffer,buflen,tmp);
1693} 1693}
1694 1694
1695static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) 1695static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
1696{ 1696{
1697 char tmp[30]; 1697 char tmp[30];
1698 sprintf(tmp, "%d", current->tgid); 1698 sprintf(tmp, "%d", current->tgid);
1699 return vfs_follow_link(nd,tmp); 1699 return ERR_PTR(vfs_follow_link(nd,tmp));
1700} 1700}
1701 1701
1702static struct inode_operations proc_self_inode_operations = { 1702static struct inode_operations proc_self_inode_operations = {
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 6c6315d04028..abe8920313fb 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -329,10 +329,10 @@ static void release_inode_number(unsigned int inum)
329 spin_unlock(&proc_inum_lock); 329 spin_unlock(&proc_inum_lock);
330} 330}
331 331
332static int proc_follow_link(struct dentry *dentry, struct nameidata *nd) 332static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
333{ 333{
334 nd_set_link(nd, PDE(dentry->d_inode)->data); 334 nd_set_link(nd, PDE(dentry->d_inode)->data);
335 return 0; 335 return NULL;
336} 336}
337 337
338static struct inode_operations proc_link_inode_operations = { 338static struct inode_operations proc_link_inode_operations = {
diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c
index 8b069e06433d..0c64bc3a0127 100644
--- a/fs/smbfs/symlink.c
+++ b/fs/smbfs/symlink.c
@@ -34,7 +34,7 @@ int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname)
34 return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname); 34 return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname);
35} 35}
36 36
37static int smb_follow_link(struct dentry *dentry, struct nameidata *nd) 37static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd)
38{ 38{
39 char *link = __getname(); 39 char *link = __getname();
40 DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry)); 40 DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry));
@@ -52,10 +52,10 @@ static int smb_follow_link(struct dentry *dentry, struct nameidata *nd)
52 } 52 }
53 } 53 }
54 nd_set_link(nd, link); 54 nd_set_link(nd, link);
55 return 0; 55 return NULL;
56} 56}
57 57
58static void smb_put_link(struct dentry *dentry, struct nameidata *nd) 58static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
59{ 59{
60 char *s = nd_get_link(nd); 60 char *s = nd_get_link(nd);
61 if (!IS_ERR(s)) 61 if (!IS_ERR(s))
diff --git a/fs/sysv/symlink.c b/fs/sysv/symlink.c
index ed637db2dcb1..b85ce61d635c 100644
--- a/fs/sysv/symlink.c
+++ b/fs/sysv/symlink.c
@@ -8,10 +8,10 @@
8#include "sysv.h" 8#include "sysv.h"
9#include <linux/namei.h> 9#include <linux/namei.h>
10 10
11static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd) 11static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
12{ 12{
13 nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data); 13 nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data);
14 return 0; 14 return NULL;
15} 15}
16 16
17struct inode_operations sysv_fast_symlink_inode_operations = { 17struct inode_operations sysv_fast_symlink_inode_operations = {
diff --git a/fs/ufs/symlink.c b/fs/ufs/symlink.c
index a0e49149098f..337512ed5781 100644
--- a/fs/ufs/symlink.c
+++ b/fs/ufs/symlink.c
@@ -29,11 +29,11 @@
29#include <linux/namei.h> 29#include <linux/namei.h>
30#include <linux/ufs_fs.h> 30#include <linux/ufs_fs.h>
31 31
32static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd) 32static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
33{ 33{
34 struct ufs_inode_info *p = UFS_I(dentry->d_inode); 34 struct ufs_inode_info *p = UFS_I(dentry->d_inode);
35 nd_set_link(nd, (char*)p->i_u1.i_symlink); 35 nd_set_link(nd, (char*)p->i_u1.i_symlink);
36 return 0; 36 return NULL;
37} 37}
38 38
39struct inode_operations ufs_fast_symlink_inode_operations = { 39struct inode_operations ufs_fast_symlink_inode_operations = {
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 407e99359391..f252605514eb 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -374,7 +374,7 @@ linvfs_rename(
374 * we need to be very careful about how much stack we use. 374 * we need to be very careful about how much stack we use.
375 * uio is kmalloced for this reason... 375 * uio is kmalloced for this reason...
376 */ 376 */
377STATIC int 377STATIC void *
378linvfs_follow_link( 378linvfs_follow_link(
379 struct dentry *dentry, 379 struct dentry *dentry,
380 struct nameidata *nd) 380 struct nameidata *nd)
@@ -391,14 +391,14 @@ linvfs_follow_link(
391 link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL); 391 link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
392 if (!link) { 392 if (!link) {
393 nd_set_link(nd, ERR_PTR(-ENOMEM)); 393 nd_set_link(nd, ERR_PTR(-ENOMEM));
394 return 0; 394 return NULL;
395 } 395 }
396 396
397 uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL); 397 uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
398 if (!uio) { 398 if (!uio) {
399 kfree(link); 399 kfree(link);
400 nd_set_link(nd, ERR_PTR(-ENOMEM)); 400 nd_set_link(nd, ERR_PTR(-ENOMEM));
401 return 0; 401 return NULL;
402 } 402 }
403 403
404 vp = LINVFS_GET_VP(dentry->d_inode); 404 vp = LINVFS_GET_VP(dentry->d_inode);
@@ -422,10 +422,10 @@ linvfs_follow_link(
422 kfree(uio); 422 kfree(uio);
423 423
424 nd_set_link(nd, link); 424 nd_set_link(nd, link);
425 return 0; 425 return NULL;
426} 426}
427 427
428static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd) 428static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
429{ 429{
430 char *s = nd_get_link(nd); 430 char *s = nd_get_link(nd);
431 if (!IS_ERR(s)) 431 if (!IS_ERR(s))