Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4d359507
Commit
4d359507
authored
Mar 14, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
namei.c: move EXPORT_SYMBOL to corresponding definitions
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
0018d8bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
28 deletions
+27
-28
fs/namei.c
fs/namei.c
+27
-28
No files found.
fs/namei.c
View file @
4d359507
...
@@ -358,6 +358,7 @@ int generic_permission(struct inode *inode, int mask)
...
@@ -358,6 +358,7 @@ int generic_permission(struct inode *inode, int mask)
return
-
EACCES
;
return
-
EACCES
;
}
}
EXPORT_SYMBOL
(
generic_permission
);
/*
/*
* We _really_ want to just do "generic_permission()" without
* We _really_ want to just do "generic_permission()" without
...
@@ -455,6 +456,7 @@ int inode_permission(struct inode *inode, int mask)
...
@@ -455,6 +456,7 @@ int inode_permission(struct inode *inode, int mask)
return
retval
;
return
retval
;
return
__inode_permission
(
inode
,
mask
);
return
__inode_permission
(
inode
,
mask
);
}
}
EXPORT_SYMBOL
(
inode_permission
);
/**
/**
* path_get - get a reference to a path
* path_get - get a reference to a path
...
@@ -924,6 +926,7 @@ int follow_up(struct path *path)
...
@@ -924,6 +926,7 @@ int follow_up(struct path *path)
path
->
mnt
=
&
parent
->
mnt
;
path
->
mnt
=
&
parent
->
mnt
;
return
1
;
return
1
;
}
}
EXPORT_SYMBOL
(
follow_up
);
/*
/*
* Perform an automount
* Perform an automount
...
@@ -1085,6 +1088,7 @@ int follow_down_one(struct path *path)
...
@@ -1085,6 +1088,7 @@ int follow_down_one(struct path *path)
}
}
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
follow_down_one
);
static
inline
bool
managed_dentry_might_block
(
struct
dentry
*
dentry
)
static
inline
bool
managed_dentry_might_block
(
struct
dentry
*
dentry
)
{
{
...
@@ -1223,6 +1227,7 @@ int follow_down(struct path *path)
...
@@ -1223,6 +1227,7 @@ int follow_down(struct path *path)
}
}
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
follow_down
);
/*
/*
* Skip to top of mountpoint pile in refwalk mode for follow_dotdot()
* Skip to top of mountpoint pile in refwalk mode for follow_dotdot()
...
@@ -2025,6 +2030,7 @@ int kern_path(const char *name, unsigned int flags, struct path *path)
...
@@ -2025,6 +2030,7 @@ int kern_path(const char *name, unsigned int flags, struct path *path)
*
path
=
nd
.
path
;
*
path
=
nd
.
path
;
return
res
;
return
res
;
}
}
EXPORT_SYMBOL
(
kern_path
);
/**
/**
* vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair
* vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair
...
@@ -2049,6 +2055,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
...
@@ -2049,6 +2055,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
*
path
=
nd
.
path
;
*
path
=
nd
.
path
;
return
err
;
return
err
;
}
}
EXPORT_SYMBOL
(
vfs_path_lookup
);
/*
/*
* Restricted form of lookup. Doesn't follow links, single-component only,
* Restricted form of lookup. Doesn't follow links, single-component only,
...
@@ -2111,6 +2118,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
...
@@ -2111,6 +2118,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
return
__lookup_hash
(
&
this
,
base
,
0
);
return
__lookup_hash
(
&
this
,
base
,
0
);
}
}
EXPORT_SYMBOL
(
lookup_one_len
);
int
user_path_at_empty
(
int
dfd
,
const
char
__user
*
name
,
unsigned
flags
,
int
user_path_at_empty
(
int
dfd
,
const
char
__user
*
name
,
unsigned
flags
,
struct
path
*
path
,
int
*
empty
)
struct
path
*
path
,
int
*
empty
)
...
@@ -2135,6 +2143,7 @@ int user_path_at(int dfd, const char __user *name, unsigned flags,
...
@@ -2135,6 +2143,7 @@ int user_path_at(int dfd, const char __user *name, unsigned flags,
{
{
return
user_path_at_empty
(
dfd
,
name
,
flags
,
path
,
NULL
);
return
user_path_at_empty
(
dfd
,
name
,
flags
,
path
,
NULL
);
}
}
EXPORT_SYMBOL
(
user_path_at
);
/*
/*
* NB: most callers don't do anything directly with the reference to the
* NB: most callers don't do anything directly with the reference to the
...
@@ -2477,6 +2486,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
...
@@ -2477,6 +2486,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
mutex_lock_nested
(
&
p2
->
d_inode
->
i_mutex
,
I_MUTEX_CHILD
);
mutex_lock_nested
(
&
p2
->
d_inode
->
i_mutex
,
I_MUTEX_CHILD
);
return
NULL
;
return
NULL
;
}
}
EXPORT_SYMBOL
(
lock_rename
);
void
unlock_rename
(
struct
dentry
*
p1
,
struct
dentry
*
p2
)
void
unlock_rename
(
struct
dentry
*
p1
,
struct
dentry
*
p2
)
{
{
...
@@ -2486,6 +2496,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2)
...
@@ -2486,6 +2496,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2)
mutex_unlock
(
&
p1
->
d_inode
->
i_sb
->
s_vfs_rename_mutex
);
mutex_unlock
(
&
p1
->
d_inode
->
i_sb
->
s_vfs_rename_mutex
);
}
}
}
}
EXPORT_SYMBOL
(
unlock_rename
);
int
vfs_create
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
int
vfs_create
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
bool
want_excl
)
bool
want_excl
)
...
@@ -2506,6 +2517,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
...
@@ -2506,6 +2517,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
fsnotify_create
(
dir
,
dentry
);
fsnotify_create
(
dir
,
dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_create
);
static
int
may_open
(
struct
path
*
path
,
int
acc_mode
,
int
flag
)
static
int
may_open
(
struct
path
*
path
,
int
acc_mode
,
int
flag
)
{
{
...
@@ -3376,6 +3388,7 @@ int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
...
@@ -3376,6 +3388,7 @@ int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
fsnotify_create
(
dir
,
dentry
);
fsnotify_create
(
dir
,
dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_mknod
);
static
int
may_mknod
(
umode_t
mode
)
static
int
may_mknod
(
umode_t
mode
)
{
{
...
@@ -3465,6 +3478,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
...
@@ -3465,6 +3478,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
fsnotify_mkdir
(
dir
,
dentry
);
fsnotify_mkdir
(
dir
,
dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_mkdir
);
SYSCALL_DEFINE3
(
mkdirat
,
int
,
dfd
,
const
char
__user
*
,
pathname
,
umode_t
,
mode
)
SYSCALL_DEFINE3
(
mkdirat
,
int
,
dfd
,
const
char
__user
*
,
pathname
,
umode_t
,
mode
)
{
{
...
@@ -3519,6 +3533,7 @@ void dentry_unhash(struct dentry *dentry)
...
@@ -3519,6 +3533,7 @@ void dentry_unhash(struct dentry *dentry)
__d_drop
(
dentry
);
__d_drop
(
dentry
);
spin_unlock
(
&
dentry
->
d_lock
);
spin_unlock
(
&
dentry
->
d_lock
);
}
}
EXPORT_SYMBOL
(
dentry_unhash
);
int
vfs_rmdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
int
vfs_rmdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
{
...
@@ -3556,6 +3571,7 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
...
@@ -3556,6 +3571,7 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
d_delete
(
dentry
);
d_delete
(
dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_rmdir
);
static
long
do_rmdir
(
int
dfd
,
const
char
__user
*
pathname
)
static
long
do_rmdir
(
int
dfd
,
const
char
__user
*
pathname
)
{
{
...
@@ -3673,6 +3689,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry, struct inode **delegate
...
@@ -3673,6 +3689,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry, struct inode **delegate
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_unlink
);
/*
/*
* Make sure that the actual truncation of the file will occur outside its
* Make sure that the actual truncation of the file will occur outside its
...
@@ -3786,6 +3803,7 @@ int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
...
@@ -3786,6 +3803,7 @@ int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
fsnotify_create
(
dir
,
dentry
);
fsnotify_create
(
dir
,
dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_symlink
);
SYSCALL_DEFINE3
(
symlinkat
,
const
char
__user
*
,
oldname
,
SYSCALL_DEFINE3
(
symlinkat
,
const
char
__user
*
,
oldname
,
int
,
newdfd
,
const
char
__user
*
,
newname
)
int
,
newdfd
,
const
char
__user
*
,
newname
)
...
@@ -3894,6 +3912,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
...
@@ -3894,6 +3912,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
fsnotify_link
(
dir
,
inode
,
new_dentry
);
fsnotify_link
(
dir
,
inode
,
new_dentry
);
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_link
);
/*
/*
* Hardlinks are often used in delicate situations. We avoid
* Hardlinks are often used in delicate situations. We avoid
...
@@ -4156,6 +4175,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
...
@@ -4156,6 +4175,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
return
error
;
return
error
;
}
}
EXPORT_SYMBOL
(
vfs_rename
);
SYSCALL_DEFINE4
(
renameat
,
int
,
olddfd
,
const
char
__user
*
,
oldname
,
SYSCALL_DEFINE4
(
renameat
,
int
,
olddfd
,
const
char
__user
*
,
oldname
,
int
,
newdfd
,
const
char
__user
*
,
newname
)
int
,
newdfd
,
const
char
__user
*
,
newname
)
...
@@ -4293,6 +4313,7 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
...
@@ -4293,6 +4313,7 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
out:
out:
return
len
;
return
len
;
}
}
EXPORT_SYMBOL
(
vfs_readlink
);
/*
/*
* A helper for ->readlink(). This should be used *ONLY* for symlinks that
* A helper for ->readlink(). This should be used *ONLY* for symlinks that
...
@@ -4315,6 +4336,7 @@ int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
...
@@ -4315,6 +4336,7 @@ int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
dentry
->
d_inode
->
i_op
->
put_link
(
dentry
,
&
nd
,
cookie
);
dentry
->
d_inode
->
i_op
->
put_link
(
dentry
,
&
nd
,
cookie
);
return
res
;
return
res
;
}
}
EXPORT_SYMBOL
(
generic_readlink
);
/* get the link contents into pagecache */
/* get the link contents into pagecache */
static
char
*
page_getlink
(
struct
dentry
*
dentry
,
struct
page
**
ppage
)
static
char
*
page_getlink
(
struct
dentry
*
dentry
,
struct
page
**
ppage
)
...
@@ -4342,6 +4364,7 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
...
@@ -4342,6 +4364,7 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
}
}
return
res
;
return
res
;
}
}
EXPORT_SYMBOL
(
page_readlink
);
void
*
page_follow_link_light
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
void
*
page_follow_link_light
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
{
{
...
@@ -4349,6 +4372,7 @@ void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
...
@@ -4349,6 +4372,7 @@ void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
nd_set_link
(
nd
,
page_getlink
(
dentry
,
&
page
));
nd_set_link
(
nd
,
page_getlink
(
dentry
,
&
page
));
return
page
;
return
page
;
}
}
EXPORT_SYMBOL
(
page_follow_link_light
);
void
page_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
cookie
)
void
page_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
cookie
)
{
{
...
@@ -4359,6 +4383,7 @@ void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
...
@@ -4359,6 +4383,7 @@ void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
page_cache_release
(
page
);
page_cache_release
(
page
);
}
}
}
}
EXPORT_SYMBOL
(
page_put_link
);
/*
/*
* The nofs argument instructs pagecache_write_begin to pass AOP_FLAG_NOFS
* The nofs argument instructs pagecache_write_begin to pass AOP_FLAG_NOFS
...
@@ -4396,44 +4421,18 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs)
...
@@ -4396,44 +4421,18 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs)
fail:
fail:
return
err
;
return
err
;
}
}
EXPORT_SYMBOL
(
__page_symlink
);
int
page_symlink
(
struct
inode
*
inode
,
const
char
*
symname
,
int
len
)
int
page_symlink
(
struct
inode
*
inode
,
const
char
*
symname
,
int
len
)
{
{
return
__page_symlink
(
inode
,
symname
,
len
,
return
__page_symlink
(
inode
,
symname
,
len
,
!
(
mapping_gfp_mask
(
inode
->
i_mapping
)
&
__GFP_FS
));
!
(
mapping_gfp_mask
(
inode
->
i_mapping
)
&
__GFP_FS
));
}
}
EXPORT_SYMBOL
(
page_symlink
);
const
struct
inode_operations
page_symlink_inode_operations
=
{
const
struct
inode_operations
page_symlink_inode_operations
=
{
.
readlink
=
generic_readlink
,
.
readlink
=
generic_readlink
,
.
follow_link
=
page_follow_link_light
,
.
follow_link
=
page_follow_link_light
,
.
put_link
=
page_put_link
,
.
put_link
=
page_put_link
,
};
};
EXPORT_SYMBOL
(
user_path_at
);
EXPORT_SYMBOL
(
follow_down_one
);
EXPORT_SYMBOL
(
follow_down
);
EXPORT_SYMBOL
(
follow_up
);
EXPORT_SYMBOL
(
lock_rename
);
EXPORT_SYMBOL
(
lookup_one_len
);
EXPORT_SYMBOL
(
page_follow_link_light
);
EXPORT_SYMBOL
(
page_put_link
);
EXPORT_SYMBOL
(
page_readlink
);
EXPORT_SYMBOL
(
__page_symlink
);
EXPORT_SYMBOL
(
page_symlink
);
EXPORT_SYMBOL
(
page_symlink_inode_operations
);
EXPORT_SYMBOL
(
page_symlink_inode_operations
);
EXPORT_SYMBOL
(
kern_path
);
EXPORT_SYMBOL
(
vfs_path_lookup
);
EXPORT_SYMBOL
(
inode_permission
);
EXPORT_SYMBOL
(
unlock_rename
);
EXPORT_SYMBOL
(
vfs_create
);
EXPORT_SYMBOL
(
vfs_link
);
EXPORT_SYMBOL
(
vfs_mkdir
);
EXPORT_SYMBOL
(
vfs_mknod
);
EXPORT_SYMBOL
(
generic_permission
);
EXPORT_SYMBOL
(
vfs_readlink
);
EXPORT_SYMBOL
(
vfs_rename
);
EXPORT_SYMBOL
(
vfs_rmdir
);
EXPORT_SYMBOL
(
vfs_symlink
);
EXPORT_SYMBOL
(
vfs_unlink
);
EXPORT_SYMBOL
(
dentry_unhash
);
EXPORT_SYMBOL
(
generic_readlink
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment