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
900148dc
Commit
900148dc
authored
Nov 25, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vfs: spread struct mount - mntput_no_expire
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
95bc5f25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
fs/namespace.c
fs/namespace.c
+7
-6
No files found.
fs/namespace.c
View file @
900148dc
...
...
@@ -763,9 +763,8 @@ static inline void mntfree(struct mount *mnt)
deactivate_super
(
sb
);
}
static
void
mntput_no_expire
(
struct
vfsmount
*
m
)
static
void
mntput_no_expire
(
struct
mount
*
mnt
)
{
struct
mount
*
mnt
=
real_mount
(
m
);
put_again:
#ifdef CONFIG_SMP
br_read_lock
(
vfsmount_lock
);
...
...
@@ -792,7 +791,7 @@ static void mntput_no_expire(struct vfsmount *m)
mnt_add_count
(
mnt
,
mnt
->
mnt
.
mnt_pinned
+
1
);
mnt
->
mnt
.
mnt_pinned
=
0
;
br_write_unlock
(
vfsmount_lock
);
acct_auto_close_mnt
(
m
);
acct_auto_close_mnt
(
&
mnt
->
mnt
);
goto
put_again
;
}
br_write_unlock
(
vfsmount_lock
);
...
...
@@ -805,7 +804,7 @@ void mntput(struct vfsmount *mnt)
/* avoid cacheline pingpong, hope gcc doesn't get "smart" */
if
(
unlikely
(
mnt
->
mnt_expiry_mark
))
mnt
->
mnt_expiry_mark
=
0
;
mntput_no_expire
(
mnt
);
mntput_no_expire
(
real_mount
(
mnt
)
);
}
}
EXPORT_SYMBOL
(
mntput
);
...
...
@@ -1351,6 +1350,7 @@ static int do_umount(struct mount *mnt, int flags)
SYSCALL_DEFINE2
(
umount
,
char
__user
*
,
name
,
int
,
flags
)
{
struct
path
path
;
struct
mount
*
mnt
;
int
retval
;
int
lookup_flags
=
0
;
...
...
@@ -1363,6 +1363,7 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
retval
=
user_path_at
(
AT_FDCWD
,
name
,
lookup_flags
,
&
path
);
if
(
retval
)
goto
out
;
mnt
=
real_mount
(
path
.
mnt
);
retval
=
-
EINVAL
;
if
(
path
.
dentry
!=
path
.
mnt
->
mnt_root
)
goto
dput_and_out
;
...
...
@@ -1373,11 +1374,11 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
if
(
!
capable
(
CAP_SYS_ADMIN
))
goto
dput_and_out
;
retval
=
do_umount
(
real_mount
(
path
.
mnt
)
,
flags
);
retval
=
do_umount
(
mnt
,
flags
);
dput_and_out:
/* we mustn't call path_put() as that would clear mnt_expiry_mark */
dput
(
path
.
dentry
);
mntput_no_expire
(
path
.
mnt
);
mntput_no_expire
(
mnt
);
out:
return
retval
;
}
...
...
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