Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
900148dc
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
900148dc
编写于
11月 25, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vfs: spread struct mount - mntput_no_expire
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
95bc5f25
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
7 addition
and
6 deletion
+7
-6
fs/namespace.c
fs/namespace.c
+7
-6
未找到文件。
fs/namespace.c
浏览文件 @
900148dc
...
@@ -763,9 +763,8 @@ static inline void mntfree(struct mount *mnt)
...
@@ -763,9 +763,8 @@ static inline void mntfree(struct mount *mnt)
deactivate_super
(
sb
);
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:
put_again:
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
br_read_lock
(
vfsmount_lock
);
br_read_lock
(
vfsmount_lock
);
...
@@ -792,7 +791,7 @@ static void mntput_no_expire(struct vfsmount *m)
...
@@ -792,7 +791,7 @@ static void mntput_no_expire(struct vfsmount *m)
mnt_add_count
(
mnt
,
mnt
->
mnt
.
mnt_pinned
+
1
);
mnt_add_count
(
mnt
,
mnt
->
mnt
.
mnt_pinned
+
1
);
mnt
->
mnt
.
mnt_pinned
=
0
;
mnt
->
mnt
.
mnt_pinned
=
0
;
br_write_unlock
(
vfsmount_lock
);
br_write_unlock
(
vfsmount_lock
);
acct_auto_close_mnt
(
m
);
acct_auto_close_mnt
(
&
mnt
->
mnt
);
goto
put_again
;
goto
put_again
;
}
}
br_write_unlock
(
vfsmount_lock
);
br_write_unlock
(
vfsmount_lock
);
...
@@ -805,7 +804,7 @@ void mntput(struct vfsmount *mnt)
...
@@ -805,7 +804,7 @@ void mntput(struct vfsmount *mnt)
/* avoid cacheline pingpong, hope gcc doesn't get "smart" */
/* avoid cacheline pingpong, hope gcc doesn't get "smart" */
if
(
unlikely
(
mnt
->
mnt_expiry_mark
))
if
(
unlikely
(
mnt
->
mnt_expiry_mark
))
mnt
->
mnt_expiry_mark
=
0
;
mnt
->
mnt_expiry_mark
=
0
;
mntput_no_expire
(
mnt
);
mntput_no_expire
(
real_mount
(
mnt
)
);
}
}
}
}
EXPORT_SYMBOL
(
mntput
);
EXPORT_SYMBOL
(
mntput
);
...
@@ -1351,6 +1350,7 @@ static int do_umount(struct mount *mnt, int flags)
...
@@ -1351,6 +1350,7 @@ static int do_umount(struct mount *mnt, int flags)
SYSCALL_DEFINE2
(
umount
,
char
__user
*
,
name
,
int
,
flags
)
SYSCALL_DEFINE2
(
umount
,
char
__user
*
,
name
,
int
,
flags
)
{
{
struct
path
path
;
struct
path
path
;
struct
mount
*
mnt
;
int
retval
;
int
retval
;
int
lookup_flags
=
0
;
int
lookup_flags
=
0
;
...
@@ -1363,6 +1363,7 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
...
@@ -1363,6 +1363,7 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
retval
=
user_path_at
(
AT_FDCWD
,
name
,
lookup_flags
,
&
path
);
retval
=
user_path_at
(
AT_FDCWD
,
name
,
lookup_flags
,
&
path
);
if
(
retval
)
if
(
retval
)
goto
out
;
goto
out
;
mnt
=
real_mount
(
path
.
mnt
);
retval
=
-
EINVAL
;
retval
=
-
EINVAL
;
if
(
path
.
dentry
!=
path
.
mnt
->
mnt_root
)
if
(
path
.
dentry
!=
path
.
mnt
->
mnt_root
)
goto
dput_and_out
;
goto
dput_and_out
;
...
@@ -1373,11 +1374,11 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
...
@@ -1373,11 +1374,11 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
if
(
!
capable
(
CAP_SYS_ADMIN
))
if
(
!
capable
(
CAP_SYS_ADMIN
))
goto
dput_and_out
;
goto
dput_and_out
;
retval
=
do_umount
(
real_mount
(
path
.
mnt
)
,
flags
);
retval
=
do_umount
(
mnt
,
flags
);
dput_and_out:
dput_and_out:
/* we mustn't call path_put() as that would clear mnt_expiry_mark */
/* we mustn't call path_put() as that would clear mnt_expiry_mark */
dput
(
path
.
dentry
);
dput
(
path
.
dentry
);
mntput_no_expire
(
path
.
mnt
);
mntput_no_expire
(
mnt
);
out:
out:
return
retval
;
return
retval
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录