Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
ipipe
Commits
215748e6
Commit
215748e6
authored
Aug 07, 2014
by
Al Viro
Browse files
acct: move mnt_pin() upwards.
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
17c0a5aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
kernel/acct.c
View file @
215748e6
...
@@ -206,7 +206,6 @@ static void acct_kill(struct bsd_acct_struct *acct,
...
@@ -206,7 +206,6 @@ static void acct_kill(struct bsd_acct_struct *acct,
ns
->
bacct
=
new
;
ns
->
bacct
=
new
;
if
(
new
)
{
if
(
new
)
{
struct
vfsmount
*
m
=
new
->
file
->
f_path
.
mnt
;
struct
vfsmount
*
m
=
new
->
file
->
f_path
.
mnt
;
mnt_pin
(
m
);
spin_lock
(
&
acct_lock
);
spin_lock
(
&
acct_lock
);
hlist_add_head
(
&
new
->
s_list
,
&
m
->
mnt_sb
->
s_pins
);
hlist_add_head
(
&
new
->
s_list
,
&
m
->
mnt_sb
->
s_pins
);
hlist_add_head
(
&
new
->
m_list
,
&
real_mount
(
m
)
->
mnt_pins
);
hlist_add_head
(
&
new
->
m_list
,
&
real_mount
(
m
)
->
mnt_pins
);
...
@@ -256,6 +255,7 @@ static int acct_on(struct filename *pathname)
...
@@ -256,6 +255,7 @@ static int acct_on(struct filename *pathname)
acct
->
ns
=
ns
;
acct
->
ns
=
ns
;
mutex_init
(
&
acct
->
lock
);
mutex_init
(
&
acct
->
lock
);
mnt
=
file
->
f_path
.
mnt
;
mnt
=
file
->
f_path
.
mnt
;
mnt_pin
(
mnt
);
old
=
acct_get
(
ns
);
old
=
acct_get
(
ns
);
mutex_lock_nested
(
&
acct
->
lock
,
1
);
/* nobody has seen it yet */
mutex_lock_nested
(
&
acct
->
lock
,
1
);
/* nobody has seen it yet */
...
@@ -264,7 +264,6 @@ static int acct_on(struct filename *pathname)
...
@@ -264,7 +264,6 @@ static int acct_on(struct filename *pathname)
}
else
{
}
else
{
ns
->
bacct
=
acct
;
ns
->
bacct
=
acct
;
spin_lock
(
&
acct_lock
);
spin_lock
(
&
acct_lock
);
mnt_pin
(
mnt
);
hlist_add_head
(
&
acct
->
s_list
,
&
mnt
->
mnt_sb
->
s_pins
);
hlist_add_head
(
&
acct
->
s_list
,
&
mnt
->
mnt_sb
->
s_pins
);
hlist_add_head
(
&
acct
->
m_list
,
&
real_mount
(
mnt
)
->
mnt_pins
);
hlist_add_head
(
&
acct
->
m_list
,
&
real_mount
(
mnt
)
->
mnt_pins
);
spin_unlock
(
&
acct_lock
);
spin_unlock
(
&
acct_lock
);
...
...
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