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
Kirill Smelkov
linux
Commits
ceefda69
Commit
ceefda69
authored
Jul 26, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch get_sb_ns() users
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
aed1d84f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
fs/super.c
fs/super.c
+6
-8
include/linux/fs.h
include/linux/fs.h
+2
-3
ipc/mqueue.c
ipc/mqueue.c
+4
-4
No files found.
fs/super.c
View file @
ceefda69
...
...
@@ -715,15 +715,14 @@ static int ns_set_super(struct super_block *sb, void *data)
return
set_anon_super
(
sb
,
NULL
);
}
int
get_sb_ns
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
struct
vfsmount
*
mnt
)
struct
dentry
*
mount_ns
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
))
{
struct
super_block
*
sb
;
sb
=
sget
(
fs_type
,
ns_test_super
,
ns_set_super
,
data
);
if
(
IS_ERR
(
sb
))
return
PTR_ERR
(
sb
);
return
ERR_CAST
(
sb
);
if
(
!
sb
->
s_root
)
{
int
err
;
...
...
@@ -731,17 +730,16 @@ int get_sb_ns(struct file_system_type *fs_type, int flags, void *data,
err
=
fill_super
(
sb
,
data
,
flags
&
MS_SILENT
?
1
:
0
);
if
(
err
)
{
deactivate_locked_super
(
sb
);
return
err
;
return
ERR_PTR
(
err
)
;
}
sb
->
s_flags
|=
MS_ACTIVE
;
}
simple_set_mnt
(
mnt
,
sb
);
return
0
;
return
dget
(
sb
->
s_root
);
}
EXPORT_SYMBOL
(
get_sb
_ns
);
EXPORT_SYMBOL
(
mount
_ns
);
#ifdef CONFIG_BLOCK
static
int
set_bdev_super
(
struct
super_block
*
s
,
void
*
data
)
...
...
include/linux/fs.h
View file @
ceefda69
...
...
@@ -1789,9 +1789,8 @@ struct file_system_type {
struct
lock_class_key
i_alloc_sem_key
;
};
extern
int
get_sb_ns
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
struct
vfsmount
*
mnt
);
extern
struct
dentry
*
mount_ns
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
));
extern
struct
dentry
*
mount_bdev
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
));
...
...
ipc/mqueue.c
View file @
ceefda69
...
...
@@ -211,13 +211,13 @@ static int mqueue_fill_super(struct super_block *sb, void *data, int silent)
return
error
;
}
static
int
mqueue_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
mqueue_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
if
(
!
(
flags
&
MS_KERNMOUNT
))
data
=
current
->
nsproxy
->
ipc_ns
;
return
get_sb_ns
(
fs_type
,
flags
,
data
,
mqueue_fill_super
,
mnt
);
return
mount_ns
(
fs_type
,
flags
,
data
,
mqueue_fill_super
);
}
static
void
init_once
(
void
*
foo
)
...
...
@@ -1232,7 +1232,7 @@ static const struct super_operations mqueue_super_ops = {
static
struct
file_system_type
mqueue_fs_type
=
{
.
name
=
"mqueue"
,
.
get_sb
=
mqueue_get_sb
,
.
mount
=
mqueue_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
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