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
a713fd7f
Commit
a713fd7f
authored
Dec 01, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy do_mq_open() up a bit
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9b20d7fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ipc/mqueue.c
ipc/mqueue.c
+3
-6
No files found.
ipc/mqueue.c
View file @
a713fd7f
...
...
@@ -743,12 +743,11 @@ static int prepare_open(struct dentry *dentry, int oflag, int ro,
static
int
do_mq_open
(
const
char
__user
*
u_name
,
int
oflag
,
umode_t
mode
,
struct
mq_attr
*
attr
)
{
struct
path
path
;
struct
vfsmount
*
mnt
=
current
->
nsproxy
->
ipc_ns
->
mq_mnt
;
struct
dentry
*
root
=
mnt
->
mnt_root
;
struct
filename
*
name
;
struct
path
path
;
int
fd
,
error
;
struct
ipc_namespace
*
ipc_ns
=
current
->
nsproxy
->
ipc_ns
;
struct
vfsmount
*
mnt
=
ipc_ns
->
mq_mnt
;
struct
dentry
*
root
=
mnt
->
mnt_root
;
int
ro
;
audit_mq_open
(
oflag
,
mode
,
attr
);
...
...
@@ -761,7 +760,6 @@ static int do_mq_open(const char __user *u_name, int oflag, umode_t mode,
goto
out_putname
;
ro
=
mnt_want_write
(
mnt
);
/* we'll drop it in any case */
error
=
0
;
inode_lock
(
d_inode
(
root
));
path
.
dentry
=
lookup_one_len
(
name
->
name
,
root
,
strlen
(
name
->
name
));
if
(
IS_ERR
(
path
.
dentry
))
{
...
...
@@ -769,7 +767,6 @@ static int do_mq_open(const char __user *u_name, int oflag, umode_t mode,
goto
out_putfd
;
}
path
.
mnt
=
mntget
(
mnt
);
error
=
prepare_open
(
path
.
dentry
,
oflag
,
ro
,
mode
,
name
,
attr
);
if
(
!
error
)
{
struct
file
*
file
=
dentry_open
(
&
path
,
oflag
,
current_cred
());
...
...
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