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
8d66bf54
Commit
8d66bf54
authored
Aug 01, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] pass struct path * to do_add_mount()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d5686b44
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
fs/afs/mntpt.c
fs/afs/mntpt.c
+1
-1
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifs_dfs_ref.c
+1
-1
fs/namespace.c
fs/namespace.c
+8
-8
fs/nfs/namespace.c
fs/nfs/namespace.c
+1
-1
include/linux/mount.h
include/linux/mount.h
+2
-1
No files found.
fs/afs/mntpt.c
View file @
8d66bf54
...
...
@@ -232,7 +232,7 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
}
mntget
(
newmnt
);
err
=
do_add_mount
(
newmnt
,
nd
,
MNT_SHRINKABLE
,
&
afs_vfsmounts
);
err
=
do_add_mount
(
newmnt
,
&
nd
->
path
,
MNT_SHRINKABLE
,
&
afs_vfsmounts
);
switch
(
err
)
{
case
0
:
path_put
(
&
nd
->
path
);
...
...
fs/cifs/cifs_dfs_ref.c
View file @
8d66bf54
...
...
@@ -226,7 +226,7 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd,
int
err
;
mntget
(
newmnt
);
err
=
do_add_mount
(
newmnt
,
nd
,
nd
->
path
.
mnt
->
mnt_flags
,
mntlist
);
err
=
do_add_mount
(
newmnt
,
&
nd
->
path
,
nd
->
path
.
mnt
->
mnt_flags
,
mntlist
);
switch
(
err
)
{
case
0
:
path_put
(
&
nd
->
path
);
...
...
fs/namespace.c
View file @
8d66bf54
...
...
@@ -1667,31 +1667,31 @@ static noinline int do_new_mount(struct nameidata *nd, char *type, int flags,
if
(
IS_ERR
(
mnt
))
return
PTR_ERR
(
mnt
);
return
do_add_mount
(
mnt
,
nd
,
mnt_flags
,
NULL
);
return
do_add_mount
(
mnt
,
&
nd
->
path
,
mnt_flags
,
NULL
);
}
/*
* add a mount into a namespace's mount tree
* - provide the option of adding the new mount to an expiration list
*/
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
nameidata
*
nd
,
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
path
*
path
,
int
mnt_flags
,
struct
list_head
*
fslist
)
{
int
err
;
down_write
(
&
namespace_sem
);
/* Something was mounted here while we slept */
while
(
d_mountpoint
(
nd
->
path
.
dentry
)
&&
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
while
(
d_mountpoint
(
path
->
dentry
)
&&
follow_down
(
&
path
->
mnt
,
&
path
->
dentry
))
;
err
=
-
EINVAL
;
if
(
!
check_mnt
(
nd
->
path
.
mnt
))
if
(
!
check_mnt
(
path
->
mnt
))
goto
unlock
;
/* Refuse the same filesystem on the same mount point */
err
=
-
EBUSY
;
if
(
nd
->
path
.
mnt
->
mnt_sb
==
newmnt
->
mnt_sb
&&
nd
->
path
.
mnt
->
mnt_root
==
nd
->
path
.
dentry
)
if
(
path
->
mnt
->
mnt_sb
==
newmnt
->
mnt_sb
&&
path
->
mnt
->
mnt_root
==
path
->
dentry
)
goto
unlock
;
err
=
-
EINVAL
;
...
...
@@ -1699,7 +1699,7 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
goto
unlock
;
newmnt
->
mnt_flags
=
mnt_flags
;
if
((
err
=
graft_tree
(
newmnt
,
&
nd
->
path
)))
if
((
err
=
graft_tree
(
newmnt
,
path
)))
goto
unlock
;
if
(
fslist
)
/* add to the specified expiration list */
...
...
fs/nfs/namespace.c
View file @
8d66bf54
...
...
@@ -129,7 +129,7 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
goto
out_err
;
mntget
(
mnt
);
err
=
do_add_mount
(
mnt
,
nd
,
nd
->
path
.
mnt
->
mnt_flags
|
MNT_SHRINKABLE
,
err
=
do_add_mount
(
mnt
,
&
nd
->
path
,
nd
->
path
.
mnt
->
mnt_flags
|
MNT_SHRINKABLE
,
&
nfs_automount_list
);
if
(
err
<
0
)
{
mntput
(
mnt
);
...
...
include/linux/mount.h
View file @
8d66bf54
...
...
@@ -105,7 +105,8 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
struct
nameidata
;
extern
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
nameidata
*
nd
,
struct
path
;
extern
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
path
*
path
,
int
mnt_flags
,
struct
list_head
*
fslist
);
extern
void
mark_mounts_for_expiry
(
struct
list_head
*
mounts
);
...
...
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