提交 6e77137b 编写于 作者: A Al Viro

don't pass nameidata to ->follow_link()

its only use is getting passed to nd_jump_link(), which can obtain
it from current->nameidata
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 8402752e
...@@ -50,7 +50,7 @@ prototypes: ...@@ -50,7 +50,7 @@ prototypes:
int (*rename2) (struct inode *, struct dentry *, int (*rename2) (struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int); struct inode *, struct dentry *, unsigned int);
int (*readlink) (struct dentry *, char __user *,int); int (*readlink) (struct dentry *, char __user *,int);
const char *(*follow_link) (struct dentry *, void **, struct nameidata *); const char *(*follow_link) (struct dentry *, void **);
void (*put_link) (struct dentry *, void *); void (*put_link) (struct dentry *, void *);
void (*truncate) (struct inode *); void (*truncate) (struct inode *);
int (*permission) (struct inode *, int, unsigned int); int (*permission) (struct inode *, int, unsigned int);
......
...@@ -350,7 +350,7 @@ struct inode_operations { ...@@ -350,7 +350,7 @@ struct inode_operations {
int (*rename2) (struct inode *, struct dentry *, int (*rename2) (struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int); struct inode *, struct dentry *, unsigned int);
int (*readlink) (struct dentry *, char __user *,int); int (*readlink) (struct dentry *, char __user *,int);
const char *(*follow_link) (struct dentry *, void **, struct nameidata *); const char *(*follow_link) (struct dentry *, void **);
void (*put_link) (struct dentry *, void *); void (*put_link) (struct dentry *, void *);
int (*permission) (struct inode *, int); int (*permission) (struct inode *, int);
int (*get_acl)(struct inode *, int); int (*get_acl)(struct inode *, int);
......
...@@ -118,7 +118,7 @@ static int ll_readlink_internal(struct inode *inode, ...@@ -118,7 +118,7 @@ static int ll_readlink_internal(struct inode *inode,
return rc; return rc;
} }
static const char *ll_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *ll_follow_link(struct dentry *dentry, void **cookie)
{ {
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
struct ptlrpc_request *request = NULL; struct ptlrpc_request *request = NULL;
......
...@@ -1230,7 +1230,7 @@ ino_t v9fs_qid2ino(struct p9_qid *qid) ...@@ -1230,7 +1230,7 @@ ino_t v9fs_qid2ino(struct p9_qid *qid)
* *
*/ */
static const char *v9fs_vfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *v9fs_vfs_follow_link(struct dentry *dentry, void **cookie)
{ {
struct v9fs_session_info *v9ses = v9fs_dentry2v9ses(dentry); struct v9fs_session_info *v9ses = v9fs_dentry2v9ses(dentry);
struct p9_fid *fid = v9fs_fid_lookup(dentry); struct p9_fid *fid = v9fs_fid_lookup(dentry);
......
...@@ -910,7 +910,7 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode, ...@@ -910,7 +910,7 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
*/ */
static const char * static const char *
v9fs_vfs_follow_link_dotl(struct dentry *dentry, void **cookie, struct nameidata *nd) v9fs_vfs_follow_link_dotl(struct dentry *dentry, void **cookie)
{ {
struct p9_fid *fid = v9fs_fid_lookup(dentry); struct p9_fid *fid = v9fs_fid_lookup(dentry);
char *target; char *target;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "autofs_i.h" #include "autofs_i.h"
static const char *autofs4_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *autofs4_follow_link(struct dentry *dentry, void **cookie)
{ {
struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
struct autofs_info *ino = autofs4_dentry_ino(dentry); struct autofs_info *ino = autofs4_dentry_ino(dentry);
......
...@@ -42,7 +42,7 @@ static struct inode *befs_iget(struct super_block *, unsigned long); ...@@ -42,7 +42,7 @@ static struct inode *befs_iget(struct super_block *, unsigned long);
static struct inode *befs_alloc_inode(struct super_block *sb); static struct inode *befs_alloc_inode(struct super_block *sb);
static void befs_destroy_inode(struct inode *inode); static void befs_destroy_inode(struct inode *inode);
static void befs_destroy_inodecache(void); static void befs_destroy_inodecache(void);
static const char *befs_follow_link(struct dentry *, void **, struct nameidata *nd); static const char *befs_follow_link(struct dentry *, void **);
static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
char **out, int *out_len); char **out, int *out_len);
static int befs_nls2utf(struct super_block *sb, const char *in, int in_len, static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
...@@ -464,7 +464,7 @@ befs_destroy_inodecache(void) ...@@ -464,7 +464,7 @@ befs_destroy_inodecache(void)
* flag is set. * flag is set.
*/ */
static const char * static const char *
befs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) befs_follow_link(struct dentry *dentry, void **cookie)
{ {
struct super_block *sb = dentry->d_sb; struct super_block *sb = dentry->d_sb;
struct befs_inode_info *befs_ino = BEFS_I(d_inode(dentry)); struct befs_inode_info *befs_ino = BEFS_I(d_inode(dentry));
......
...@@ -120,7 +120,7 @@ extern struct vfsmount *cifs_dfs_d_automount(struct path *path); ...@@ -120,7 +120,7 @@ extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
#endif #endif
/* Functions related to symlinks */ /* Functions related to symlinks */
extern const char *cifs_follow_link(struct dentry *direntry, void **cookie, struct nameidata *nd); extern const char *cifs_follow_link(struct dentry *direntry, void **cookie);
extern int cifs_readlink(struct dentry *direntry, char __user *buffer, extern int cifs_readlink(struct dentry *direntry, char __user *buffer,
int buflen); int buflen);
extern int cifs_symlink(struct inode *inode, struct dentry *direntry, extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
......
...@@ -627,7 +627,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, ...@@ -627,7 +627,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
} }
const char * const char *
cifs_follow_link(struct dentry *direntry, void **cookie, struct nameidata *nd) cifs_follow_link(struct dentry *direntry, void **cookie)
{ {
struct inode *inode = d_inode(direntry); struct inode *inode = d_inode(direntry);
int rc = -ENOMEM; int rc = -ENOMEM;
......
...@@ -279,7 +279,7 @@ static int configfs_getlink(struct dentry *dentry, char * path) ...@@ -279,7 +279,7 @@ static int configfs_getlink(struct dentry *dentry, char * path)
} }
static const char *configfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *configfs_follow_link(struct dentry *dentry, void **cookie)
{ {
unsigned long page = get_zeroed_page(GFP_KERNEL); unsigned long page = get_zeroed_page(GFP_KERNEL);
int error; int error;
......
...@@ -675,7 +675,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz) ...@@ -675,7 +675,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
return rc ? ERR_PTR(rc) : buf; return rc ? ERR_PTR(rc) : buf;
} }
static const char *ecryptfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *ecryptfs_follow_link(struct dentry *dentry, void **cookie)
{ {
size_t len; size_t len;
char *buf = ecryptfs_readlink_lower(dentry, &len); char *buf = ecryptfs_readlink_lower(dentry, &len);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "xattr.h" #include "xattr.h"
#ifdef CONFIG_EXT4_FS_ENCRYPTION #ifdef CONFIG_EXT4_FS_ENCRYPTION
static const char *ext4_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *ext4_follow_link(struct dentry *dentry, void **cookie)
{ {
struct page *cpage = NULL; struct page *cpage = NULL;
char *caddr, *paddr = NULL; char *caddr, *paddr = NULL;
......
...@@ -296,9 +296,9 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry) ...@@ -296,9 +296,9 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
return err; return err;
} }
static const char *f2fs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *f2fs_follow_link(struct dentry *dentry, void **cookie)
{ {
const char *link = page_follow_link_light(dentry, cookie, nd); const char *link = page_follow_link_light(dentry, cookie);
if (!IS_ERR(link) && !*link) { if (!IS_ERR(link) && !*link) {
/* this is broken symlink case */ /* this is broken symlink case */
page_put_link(dentry, *cookie); page_put_link(dentry, *cookie);
......
...@@ -1365,7 +1365,7 @@ static int fuse_readdir(struct file *file, struct dir_context *ctx) ...@@ -1365,7 +1365,7 @@ static int fuse_readdir(struct file *file, struct dir_context *ctx)
return err; return err;
} }
static const char *fuse_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *fuse_follow_link(struct dentry *dentry, void **cookie)
{ {
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_conn *fc = get_fuse_conn(inode);
......
...@@ -1548,7 +1548,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, ...@@ -1548,7 +1548,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
* Returns: 0 on success or error code * Returns: 0 on success or error code
*/ */
static const char *gfs2_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *gfs2_follow_link(struct dentry *dentry, void **cookie)
{ {
struct gfs2_inode *ip = GFS2_I(d_inode(dentry)); struct gfs2_inode *ip = GFS2_I(d_inode(dentry));
struct gfs2_holder i_gh; struct gfs2_holder i_gh;
......
...@@ -892,7 +892,7 @@ static const struct inode_operations hostfs_dir_iops = { ...@@ -892,7 +892,7 @@ static const struct inode_operations hostfs_dir_iops = {
.setattr = hostfs_setattr, .setattr = hostfs_setattr,
}; };
static const char *hostfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *hostfs_follow_link(struct dentry *dentry, void **cookie)
{ {
char *link = __getname(); char *link = __getname();
if (link) { if (link) {
......
...@@ -642,11 +642,11 @@ static int hppfs_readlink(struct dentry *dentry, char __user *buffer, ...@@ -642,11 +642,11 @@ static int hppfs_readlink(struct dentry *dentry, char __user *buffer,
buflen); buflen);
} }
static const char *hppfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *hppfs_follow_link(struct dentry *dentry, void **cookie)
{ {
struct dentry *proc_dentry = HPPFS_I(d_inode(dentry))->proc_dentry; struct dentry *proc_dentry = HPPFS_I(d_inode(dentry))->proc_dentry;
return d_inode(proc_dentry)->i_op->follow_link(proc_dentry, cookie, nd); return d_inode(proc_dentry)->i_op->follow_link(proc_dentry, cookie);
} }
static void hppfs_put_link(struct dentry *dentry, void *cookie) static void hppfs_put_link(struct dentry *dentry, void *cookie)
......
...@@ -112,7 +112,7 @@ static int kernfs_getlink(struct dentry *dentry, char *path) ...@@ -112,7 +112,7 @@ static int kernfs_getlink(struct dentry *dentry, char *path)
return error; return error;
} }
static const char *kernfs_iop_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *kernfs_iop_follow_link(struct dentry *dentry, void **cookie)
{ {
int error = -ENOMEM; int error = -ENOMEM;
unsigned long page = get_zeroed_page(GFP_KERNEL); unsigned long page = get_zeroed_page(GFP_KERNEL);
......
...@@ -1091,7 +1091,7 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp, ...@@ -1091,7 +1091,7 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp,
} }
EXPORT_SYMBOL(simple_nosetlease); EXPORT_SYMBOL(simple_nosetlease);
const char *simple_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) const char *simple_follow_link(struct dentry *dentry, void **cookie)
{ {
return d_inode(dentry)->i_link; return d_inode(dentry)->i_link;
} }
......
...@@ -753,8 +753,9 @@ static inline void path_to_nameidata(const struct path *path, ...@@ -753,8 +753,9 @@ static inline void path_to_nameidata(const struct path *path,
* Helper to directly jump to a known parsed path from ->follow_link, * Helper to directly jump to a known parsed path from ->follow_link,
* caller must have taken a reference to path beforehand. * caller must have taken a reference to path beforehand.
*/ */
void nd_jump_link(struct nameidata *nd, struct path *path) void nd_jump_link(struct path *path)
{ {
struct nameidata *nd = current->nameidata;
path_put(&nd->path); path_put(&nd->path);
nd->path = *path; nd->path = *path;
...@@ -916,7 +917,7 @@ const char *get_link(struct nameidata *nd) ...@@ -916,7 +917,7 @@ const char *get_link(struct nameidata *nd)
nd->last_type = LAST_BIND; nd->last_type = LAST_BIND;
res = inode->i_link; res = inode->i_link;
if (!res) { if (!res) {
res = inode->i_op->follow_link(dentry, &last->cookie, nd); res = inode->i_op->follow_link(dentry, &last->cookie);
if (IS_ERR(res)) { if (IS_ERR(res)) {
out: out:
path_put(&last->link); path_put(&last->link);
...@@ -4485,12 +4486,12 @@ int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) ...@@ -4485,12 +4486,12 @@ int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
int res; int res;
if (!link) { if (!link) {
link = dentry->d_inode->i_op->follow_link(dentry, &cookie, NULL); link = dentry->d_inode->i_op->follow_link(dentry, &cookie);
if (IS_ERR(link)) if (IS_ERR(link))
return PTR_ERR(link); return PTR_ERR(link);
} }
res = readlink_copy(buffer, buflen, link); res = readlink_copy(buffer, buflen, link);
if (cookie && dentry->d_inode->i_op->put_link) if (dentry->d_inode->i_op->put_link)
dentry->d_inode->i_op->put_link(dentry, cookie); dentry->d_inode->i_op->put_link(dentry, cookie);
return res; return res;
} }
...@@ -4523,7 +4524,7 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen) ...@@ -4523,7 +4524,7 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
} }
EXPORT_SYMBOL(page_readlink); EXPORT_SYMBOL(page_readlink);
const char *page_follow_link_light(struct dentry *dentry, void **cookie, struct nameidata *nd) const char *page_follow_link_light(struct dentry *dentry, void **cookie)
{ {
struct page *page = NULL; struct page *page = NULL;
char *res = page_getlink(dentry, &page); char *res = page_getlink(dentry, &page);
......
...@@ -42,7 +42,7 @@ static int nfs_symlink_filler(struct inode *inode, struct page *page) ...@@ -42,7 +42,7 @@ static int nfs_symlink_filler(struct inode *inode, struct page *page)
return -EIO; return -EIO;
} }
static const char *nfs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *nfs_follow_link(struct dentry *dentry, void **cookie)
{ {
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
struct page *page; struct page *page;
......
...@@ -140,7 +140,7 @@ struct ovl_link_data { ...@@ -140,7 +140,7 @@ struct ovl_link_data {
void *cookie; void *cookie;
}; };
static const char *ovl_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *ovl_follow_link(struct dentry *dentry, void **cookie)
{ {
struct dentry *realdentry; struct dentry *realdentry;
struct inode *realinode; struct inode *realinode;
...@@ -160,7 +160,7 @@ static const char *ovl_follow_link(struct dentry *dentry, void **cookie, struct ...@@ -160,7 +160,7 @@ static const char *ovl_follow_link(struct dentry *dentry, void **cookie, struct
data->realdentry = realdentry; data->realdentry = realdentry;
} }
ret = realinode->i_op->follow_link(realdentry, cookie, nd); ret = realinode->i_op->follow_link(realdentry, cookie);
if (IS_ERR_OR_NULL(ret)) { if (IS_ERR_OR_NULL(ret)) {
kfree(data); kfree(data);
return ret; return ret;
......
...@@ -1380,7 +1380,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path) ...@@ -1380,7 +1380,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
return -ENOENT; return -ENOENT;
} }
static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie)
{ {
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
struct path path; struct path path;
...@@ -1394,7 +1394,7 @@ static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie, st ...@@ -1394,7 +1394,7 @@ static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie, st
if (error) if (error)
goto out; goto out;
nd_jump_link(nd, &path); nd_jump_link(&path);
return NULL; return NULL;
out: out:
return ERR_PTR(error); return ERR_PTR(error);
......
...@@ -393,7 +393,7 @@ static const struct file_operations proc_reg_file_ops_no_compat = { ...@@ -393,7 +393,7 @@ static const struct file_operations proc_reg_file_ops_no_compat = {
}; };
#endif #endif
static const char *proc_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *proc_follow_link(struct dentry *dentry, void **cookie)
{ {
struct proc_dir_entry *pde = PDE(d_inode(dentry)); struct proc_dir_entry *pde = PDE(d_inode(dentry));
if (unlikely(!use_pde(pde))) if (unlikely(!use_pde(pde)))
......
...@@ -30,7 +30,7 @@ static const struct proc_ns_operations *ns_entries[] = { ...@@ -30,7 +30,7 @@ static const struct proc_ns_operations *ns_entries[] = {
&mntns_operations, &mntns_operations,
}; };
static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie)
{ {
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
const struct proc_ns_operations *ns_ops = PROC_I(inode)->ns_ops; const struct proc_ns_operations *ns_ops = PROC_I(inode)->ns_ops;
...@@ -45,7 +45,7 @@ static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie, str ...@@ -45,7 +45,7 @@ static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie, str
if (ptrace_may_access(task, PTRACE_MODE_READ)) { if (ptrace_may_access(task, PTRACE_MODE_READ)) {
error = ns_get_path(&ns_path, task, ns_ops); error = ns_get_path(&ns_path, task, ns_ops);
if (!error) if (!error)
nd_jump_link(nd, &ns_path); nd_jump_link(&ns_path);
} }
put_task_struct(task); put_task_struct(task);
return error; return error;
......
...@@ -18,7 +18,7 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer, ...@@ -18,7 +18,7 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
return readlink_copy(buffer, buflen, tmp); return readlink_copy(buffer, buflen, tmp);
} }
static const char *proc_self_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *proc_self_follow_link(struct dentry *dentry, void **cookie)
{ {
struct pid_namespace *ns = dentry->d_sb->s_fs_info; struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns); pid_t tgid = task_tgid_nr_ns(current, ns);
......
...@@ -19,7 +19,7 @@ static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer, ...@@ -19,7 +19,7 @@ static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer,
return readlink_copy(buffer, buflen, tmp); return readlink_copy(buffer, buflen, tmp);
} }
static const char *proc_thread_self_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *proc_thread_self_follow_link(struct dentry *dentry, void **cookie)
{ {
struct pid_namespace *ns = dentry->d_sb->s_fs_info; struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns); pid_t tgid = task_tgid_nr_ns(current, ns);
......
...@@ -416,8 +416,7 @@ xfs_vn_rename( ...@@ -416,8 +416,7 @@ xfs_vn_rename(
STATIC const char * STATIC const char *
xfs_vn_follow_link( xfs_vn_follow_link(
struct dentry *dentry, struct dentry *dentry,
void **cookie, void **cookie)
struct nameidata *nd)
{ {
char *link; char *link;
int error = -ENOMEM; int error = -ENOMEM;
......
...@@ -1608,7 +1608,7 @@ struct file_operations { ...@@ -1608,7 +1608,7 @@ struct file_operations {
struct inode_operations { struct inode_operations {
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
const char * (*follow_link) (struct dentry *, void **, struct nameidata *); const char * (*follow_link) (struct dentry *, void **);
int (*permission) (struct inode *, int); int (*permission) (struct inode *, int);
struct posix_acl * (*get_acl)(struct inode *, int); struct posix_acl * (*get_acl)(struct inode *, int);
...@@ -2705,7 +2705,7 @@ extern const struct file_operations generic_ro_fops; ...@@ -2705,7 +2705,7 @@ extern const struct file_operations generic_ro_fops;
extern int readlink_copy(char __user *, int, const char *); extern int readlink_copy(char __user *, int, const char *);
extern int page_readlink(struct dentry *, char __user *, int); extern int page_readlink(struct dentry *, char __user *, int);
extern const char *page_follow_link_light(struct dentry *, void **, struct nameidata *); extern const char *page_follow_link_light(struct dentry *, void **);
extern void page_put_link(struct dentry *, void *); extern void page_put_link(struct dentry *, void *);
extern int __page_symlink(struct inode *inode, const char *symname, int len, extern int __page_symlink(struct inode *inode, const char *symname, int len,
int nofs); int nofs);
...@@ -2722,7 +2722,7 @@ void __inode_sub_bytes(struct inode *inode, loff_t bytes); ...@@ -2722,7 +2722,7 @@ void __inode_sub_bytes(struct inode *inode, loff_t bytes);
void inode_sub_bytes(struct inode *inode, loff_t bytes); void inode_sub_bytes(struct inode *inode, loff_t bytes);
loff_t inode_get_bytes(struct inode *inode); loff_t inode_get_bytes(struct inode *inode);
void inode_set_bytes(struct inode *inode, loff_t bytes); void inode_set_bytes(struct inode *inode, loff_t bytes);
const char *simple_follow_link(struct dentry *, void **, struct nameidata *); const char *simple_follow_link(struct dentry *, void **);
extern const struct inode_operations simple_symlink_inode_operations; extern const struct inode_operations simple_symlink_inode_operations;
extern int iterate_dir(struct file *, struct dir_context *); extern int iterate_dir(struct file *, struct dir_context *);
......
...@@ -72,7 +72,7 @@ extern int follow_up(struct path *); ...@@ -72,7 +72,7 @@ extern int follow_up(struct path *);
extern struct dentry *lock_rename(struct dentry *, struct dentry *); extern struct dentry *lock_rename(struct dentry *, struct dentry *);
extern void unlock_rename(struct dentry *, struct dentry *); extern void unlock_rename(struct dentry *, struct dentry *);
extern void nd_jump_link(struct nameidata *nd, struct path *path); extern void nd_jump_link(struct path *path);
static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
{ {
......
...@@ -2475,7 +2475,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s ...@@ -2475,7 +2475,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
return 0; return 0;
} }
static const char *shmem_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd) static const char *shmem_follow_link(struct dentry *dentry, void **cookie)
{ {
struct page *page = NULL; struct page *page = NULL;
int error = shmem_getpage(d_inode(dentry), 0, &page, SGP_READ, NULL); int error = shmem_getpage(d_inode(dentry), 0, &page, SGP_READ, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册