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
nexedi
linux
Commits
dcf787f3
Commit
dcf787f3
authored
Mar 01, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
constify path_get/path_put and fs_struct.c stuff
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
26567cdb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
fs/fs_struct.c
fs/fs_struct.c
+3
-3
fs/internal.h
fs/internal.h
+1
-1
fs/namei.c
fs/namei.c
+2
-2
include/linux/fs_struct.h
include/linux/fs_struct.h
+2
-2
include/linux/path.h
include/linux/path.h
+2
-2
No files found.
fs/fs_struct.c
View file @
dcf787f3
...
...
@@ -10,7 +10,7 @@
* Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
* It can block.
*/
void
set_fs_root
(
struct
fs_struct
*
fs
,
struct
path
*
path
)
void
set_fs_root
(
struct
fs_struct
*
fs
,
const
struct
path
*
path
)
{
struct
path
old_root
;
...
...
@@ -29,7 +29,7 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
* Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.
* It can block.
*/
void
set_fs_pwd
(
struct
fs_struct
*
fs
,
struct
path
*
path
)
void
set_fs_pwd
(
struct
fs_struct
*
fs
,
const
struct
path
*
path
)
{
struct
path
old_pwd
;
...
...
@@ -53,7 +53,7 @@ static inline int replace_path(struct path *p, const struct path *old, const str
return
1
;
}
void
chroot_fs_refs
(
struct
path
*
old_root
,
struct
path
*
new_root
)
void
chroot_fs_refs
(
const
struct
path
*
old_root
,
const
struct
path
*
new_root
)
{
struct
task_struct
*
g
,
*
p
;
struct
fs_struct
*
fs
;
...
...
fs/internal.h
View file @
dcf787f3
...
...
@@ -69,7 +69,7 @@ extern void __mnt_drop_write_file(struct file *);
/*
* fs_struct.c
*/
extern
void
chroot_fs_refs
(
struct
path
*
,
struct
path
*
);
extern
void
chroot_fs_refs
(
const
struct
path
*
,
const
struct
path
*
);
/*
* file_table.c
...
...
fs/namei.c
View file @
dcf787f3
...
...
@@ -451,7 +451,7 @@ int inode_permission(struct inode *inode, int mask)
*
* Given a path increment the reference count to the dentry and the vfsmount.
*/
void
path_get
(
struct
path
*
path
)
void
path_get
(
const
struct
path
*
path
)
{
mntget
(
path
->
mnt
);
dget
(
path
->
dentry
);
...
...
@@ -464,7 +464,7 @@ EXPORT_SYMBOL(path_get);
*
* Given a path decrement the reference count to the dentry and the vfsmount.
*/
void
path_put
(
struct
path
*
path
)
void
path_put
(
const
struct
path
*
path
)
{
dput
(
path
->
dentry
);
mntput
(
path
->
mnt
);
...
...
include/linux/fs_struct.h
View file @
dcf787f3
...
...
@@ -17,8 +17,8 @@ struct fs_struct {
extern
struct
kmem_cache
*
fs_cachep
;
extern
void
exit_fs
(
struct
task_struct
*
);
extern
void
set_fs_root
(
struct
fs_struct
*
,
struct
path
*
);
extern
void
set_fs_pwd
(
struct
fs_struct
*
,
struct
path
*
);
extern
void
set_fs_root
(
struct
fs_struct
*
,
const
struct
path
*
);
extern
void
set_fs_pwd
(
struct
fs_struct
*
,
const
struct
path
*
);
extern
struct
fs_struct
*
copy_fs_struct
(
struct
fs_struct
*
);
extern
void
free_fs_struct
(
struct
fs_struct
*
);
extern
int
unshare_fs_struct
(
void
);
...
...
include/linux/path.h
View file @
dcf787f3
...
...
@@ -9,8 +9,8 @@ struct path {
struct
dentry
*
dentry
;
};
extern
void
path_get
(
struct
path
*
);
extern
void
path_put
(
struct
path
*
);
extern
void
path_get
(
const
struct
path
*
);
extern
void
path_put
(
const
struct
path
*
);
static
inline
int
path_equal
(
const
struct
path
*
path1
,
const
struct
path
*
path2
)
{
...
...
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