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
589ff870
Commit
589ff870
authored
Apr 18, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch collect_mounts() to struct path
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
bab77ebf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
fs/namespace.c
fs/namespace.c
+2
-2
include/linux/fs.h
include/linux/fs.h
+1
-1
kernel/audit_tree.c
kernel/audit_tree.c
+3
-3
No files found.
fs/namespace.c
View file @
589ff870
...
...
@@ -1253,11 +1253,11 @@ struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
return
NULL
;
}
struct
vfsmount
*
collect_mounts
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
)
struct
vfsmount
*
collect_mounts
(
struct
path
*
path
)
{
struct
vfsmount
*
tree
;
down_write
(
&
namespace_sem
);
tree
=
copy_tree
(
mnt
,
dentry
,
CL_COPY_ALL
|
CL_PRIVATE
);
tree
=
copy_tree
(
path
->
mnt
,
path
->
dentry
,
CL_COPY_ALL
|
CL_PRIVATE
);
up_write
(
&
namespace_sem
);
return
tree
;
}
...
...
include/linux/fs.h
View file @
589ff870
...
...
@@ -1800,7 +1800,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
extern
int
may_umount_tree
(
struct
vfsmount
*
);
extern
int
may_umount
(
struct
vfsmount
*
);
extern
long
do_mount
(
char
*
,
char
*
,
char
*
,
unsigned
long
,
void
*
);
extern
struct
vfsmount
*
collect_mounts
(
struct
vfsmount
*
,
struct
dentry
*
);
extern
struct
vfsmount
*
collect_mounts
(
struct
path
*
);
extern
void
drop_collected_mounts
(
struct
vfsmount
*
);
extern
int
vfs_statfs
(
struct
dentry
*
,
struct
kstatfs
*
);
...
...
kernel/audit_tree.c
View file @
589ff870
...
...
@@ -568,7 +568,7 @@ void audit_trim_trees(void)
if
(
err
)
goto
skip_it
;
root_mnt
=
collect_mounts
(
path
.
mnt
,
path
.
dentry
);
root_mnt
=
collect_mounts
(
&
path
);
path_put
(
&
path
);
if
(
!
root_mnt
)
goto
skip_it
;
...
...
@@ -660,7 +660,7 @@ int audit_add_tree_rule(struct audit_krule *rule)
err
=
kern_path
(
tree
->
pathname
,
0
,
&
path
);
if
(
err
)
goto
Err
;
mnt
=
collect_mounts
(
path
.
mnt
,
path
.
dentry
);
mnt
=
collect_mounts
(
&
path
);
path_put
(
&
path
);
if
(
!
mnt
)
{
err
=
-
ENOMEM
;
...
...
@@ -720,7 +720,7 @@ int audit_tag_tree(char *old, char *new)
err
=
kern_path
(
new
,
0
,
&
path
);
if
(
err
)
return
err
;
tagged
=
collect_mounts
(
path
.
mnt
,
path
.
dentry
);
tagged
=
collect_mounts
(
&
path
);
path_put
(
&
path
);
if
(
!
tagged
)
return
-
ENOMEM
;
...
...
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