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
51139ada
Commit
51139ada
authored
Jul 25, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert get_sb_pseudo() users
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3c26ff6e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
43 deletions
+32
-43
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/perfmon.c
+4
-5
drivers/mtd/mtdchar.c
drivers/mtd/mtdchar.c
+4
-6
fs/anon_inodes.c
fs/anon_inodes.c
+4
-6
fs/block_dev.c
fs/block_dev.c
+4
-4
fs/libfs.c
fs/libfs.c
+6
-8
fs/pipe.c
fs/pipe.c
+4
-5
include/linux/fs.h
include/linux/fs.h
+2
-3
net/socket.c
net/socket.c
+4
-6
No files found.
arch/ia64/kernel/perfmon.c
View file @
51139ada
...
@@ -618,16 +618,15 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
...
@@ -618,16 +618,15 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
}
}
static
int
static
struct
dentry
*
pfmfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
pfmfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
struct
vfsmount
*
mnt
)
{
{
return
get_sb_pseudo
(
fs_type
,
"pfm:"
,
NULL
,
PFMFS_MAGIC
,
mnt
);
return
mount_pseudo
(
fs_type
,
"pfm:"
,
NULL
,
PFMFS_MAGIC
);
}
}
static
struct
file_system_type
pfm_fs_type
=
{
static
struct
file_system_type
pfm_fs_type
=
{
.
name
=
"pfmfs"
,
.
name
=
"pfmfs"
,
.
get_sb
=
pfmfs_get_sb
,
.
mount
=
pfmfs_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_super
,
};
};
...
...
drivers/mtd/mtdchar.c
View file @
51139ada
...
@@ -1030,17 +1030,15 @@ static const struct file_operations mtd_fops = {
...
@@ -1030,17 +1030,15 @@ static const struct file_operations mtd_fops = {
#endif
#endif
};
};
static
int
mtd_inodefs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
static
struct
dentry
*
mtd_inodefs_mount
(
struct
file_system_type
*
fs_type
,
const
char
*
dev_name
,
void
*
data
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
struct
vfsmount
*
mnt
)
{
{
return
get_sb_pseudo
(
fs_type
,
"mtd_inode:"
,
NULL
,
MTD_INODE_FS_MAGIC
,
return
mount_pseudo
(
fs_type
,
"mtd_inode:"
,
NULL
,
MTD_INODE_FS_MAGIC
);
mnt
);
}
}
static
struct
file_system_type
mtd_inodefs_type
=
{
static
struct
file_system_type
mtd_inodefs_type
=
{
.
name
=
"mtd_inodefs"
,
.
name
=
"mtd_inodefs"
,
.
get_sb
=
mtd_inodefs_get_sb
,
.
mount
=
mtd_inodefs_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_super
,
};
};
...
...
fs/anon_inodes.c
View file @
51139ada
...
@@ -26,12 +26,10 @@ static struct vfsmount *anon_inode_mnt __read_mostly;
...
@@ -26,12 +26,10 @@ static struct vfsmount *anon_inode_mnt __read_mostly;
static
struct
inode
*
anon_inode_inode
;
static
struct
inode
*
anon_inode_inode
;
static
const
struct
file_operations
anon_inode_fops
;
static
const
struct
file_operations
anon_inode_fops
;
static
int
anon_inodefs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
static
struct
dentry
*
anon_inodefs_mount
(
struct
file_system_type
*
fs_type
,
const
char
*
dev_name
,
void
*
data
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
struct
vfsmount
*
mnt
)
{
{
return
get_sb_pseudo
(
fs_type
,
"anon_inode:"
,
NULL
,
ANON_INODE_FS_MAGIC
,
return
mount_pseudo
(
fs_type
,
"anon_inode:"
,
NULL
,
ANON_INODE_FS_MAGIC
);
mnt
);
}
}
/*
/*
...
@@ -45,7 +43,7 @@ static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
...
@@ -45,7 +43,7 @@ static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
static
struct
file_system_type
anon_inode_fs_type
=
{
static
struct
file_system_type
anon_inode_fs_type
=
{
.
name
=
"anon_inodefs"
,
.
name
=
"anon_inodefs"
,
.
get_sb
=
anon_inodefs_get_sb
,
.
mount
=
anon_inodefs_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_super
,
};
};
static
const
struct
dentry_operations
anon_inodefs_dentry_operations
=
{
static
const
struct
dentry_operations
anon_inodefs_dentry_operations
=
{
...
...
fs/block_dev.c
View file @
51139ada
...
@@ -464,15 +464,15 @@ static const struct super_operations bdev_sops = {
...
@@ -464,15 +464,15 @@ static const struct super_operations bdev_sops = {
.
evict_inode
=
bdev_evict_inode
,
.
evict_inode
=
bdev_evict_inode
,
};
};
static
int
bd_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
bd_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
{
return
get_sb_pseudo
(
fs_type
,
"bdev:"
,
&
bdev_sops
,
0x62646576
,
mnt
);
return
mount_pseudo
(
fs_type
,
"bdev:"
,
&
bdev_sops
,
0x62646576
);
}
}
static
struct
file_system_type
bd_type
=
{
static
struct
file_system_type
bd_type
=
{
.
name
=
"bdev"
,
.
name
=
"bdev"
,
.
get_sb
=
bd_get_sb
,
.
mount
=
bd_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_super
,
};
};
...
...
fs/libfs.c
View file @
51139ada
...
@@ -201,9 +201,8 @@ static const struct super_operations simple_super_operations = {
...
@@ -201,9 +201,8 @@ static const struct super_operations simple_super_operations = {
* Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that
* Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that
* will never be mountable)
* will never be mountable)
*/
*/
int
get_sb_pseudo
(
struct
file_system_type
*
fs_type
,
char
*
name
,
struct
dentry
*
mount_pseudo
(
struct
file_system_type
*
fs_type
,
char
*
name
,
const
struct
super_operations
*
ops
,
unsigned
long
magic
,
const
struct
super_operations
*
ops
,
unsigned
long
magic
)
struct
vfsmount
*
mnt
)
{
{
struct
super_block
*
s
=
sget
(
fs_type
,
NULL
,
set_anon_super
,
NULL
);
struct
super_block
*
s
=
sget
(
fs_type
,
NULL
,
set_anon_super
,
NULL
);
struct
dentry
*
dentry
;
struct
dentry
*
dentry
;
...
@@ -211,7 +210,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
...
@@ -211,7 +210,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
struct
qstr
d_name
=
{.
name
=
name
,
.
len
=
strlen
(
name
)};
struct
qstr
d_name
=
{.
name
=
name
,
.
len
=
strlen
(
name
)};
if
(
IS_ERR
(
s
))
if
(
IS_ERR
(
s
))
return
PTR_ERR
(
s
);
return
ERR_CAST
(
s
);
s
->
s_flags
=
MS_NOUSER
;
s
->
s_flags
=
MS_NOUSER
;
s
->
s_maxbytes
=
MAX_LFS_FILESIZE
;
s
->
s_maxbytes
=
MAX_LFS_FILESIZE
;
...
@@ -241,12 +240,11 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
...
@@ -241,12 +240,11 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
d_instantiate
(
dentry
,
root
);
d_instantiate
(
dentry
,
root
);
s
->
s_root
=
dentry
;
s
->
s_root
=
dentry
;
s
->
s_flags
|=
MS_ACTIVE
;
s
->
s_flags
|=
MS_ACTIVE
;
simple_set_mnt
(
mnt
,
s
);
return
dget
(
s
->
s_root
);
return
0
;
Enomem:
Enomem:
deactivate_locked_super
(
s
);
deactivate_locked_super
(
s
);
return
-
ENOMEM
;
return
ERR_PTR
(
-
ENOMEM
)
;
}
}
int
simple_link
(
struct
dentry
*
old_dentry
,
struct
inode
*
dir
,
struct
dentry
*
dentry
)
int
simple_link
(
struct
dentry
*
old_dentry
,
struct
inode
*
dir
,
struct
dentry
*
dentry
)
...
@@ -951,7 +949,7 @@ EXPORT_SYMBOL(dcache_dir_lseek);
...
@@ -951,7 +949,7 @@ EXPORT_SYMBOL(dcache_dir_lseek);
EXPORT_SYMBOL
(
dcache_dir_open
);
EXPORT_SYMBOL
(
dcache_dir_open
);
EXPORT_SYMBOL
(
dcache_readdir
);
EXPORT_SYMBOL
(
dcache_readdir
);
EXPORT_SYMBOL
(
generic_read_dir
);
EXPORT_SYMBOL
(
generic_read_dir
);
EXPORT_SYMBOL
(
get_sb
_pseudo
);
EXPORT_SYMBOL
(
mount
_pseudo
);
EXPORT_SYMBOL
(
simple_write_begin
);
EXPORT_SYMBOL
(
simple_write_begin
);
EXPORT_SYMBOL
(
simple_write_end
);
EXPORT_SYMBOL
(
simple_write_end
);
EXPORT_SYMBOL
(
simple_dir_inode_operations
);
EXPORT_SYMBOL
(
simple_dir_inode_operations
);
...
...
fs/pipe.c
View file @
51139ada
...
@@ -1247,16 +1247,15 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
...
@@ -1247,16 +1247,15 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
* any operations on the root directory. However, we need a non-trivial
* any operations on the root directory. However, we need a non-trivial
* d_name - pipe: will go nicely and kill the special-casing in procfs.
* d_name - pipe: will go nicely and kill the special-casing in procfs.
*/
*/
static
int
pipefs_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
pipefs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
struct
vfsmount
*
mnt
)
{
{
return
get_sb_pseudo
(
fs_type
,
"pipe:"
,
NULL
,
PIPEFS_MAGIC
,
mnt
);
return
mount_pseudo
(
fs_type
,
"pipe:"
,
NULL
,
PIPEFS_MAGIC
);
}
}
static
struct
file_system_type
pipe_fs_type
=
{
static
struct
file_system_type
pipe_fs_type
=
{
.
name
=
"pipefs"
,
.
name
=
"pipefs"
,
.
get_sb
=
pipefs_get_sb
,
.
mount
=
pipefs_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_super
,
};
};
...
...
include/linux/fs.h
View file @
51139ada
...
@@ -1824,9 +1824,8 @@ struct super_block *sget(struct file_system_type *type,
...
@@ -1824,9 +1824,8 @@ struct super_block *sget(struct file_system_type *type,
int
(
*
test
)(
struct
super_block
*
,
void
*
),
int
(
*
test
)(
struct
super_block
*
,
void
*
),
int
(
*
set
)(
struct
super_block
*
,
void
*
),
int
(
*
set
)(
struct
super_block
*
,
void
*
),
void
*
data
);
void
*
data
);
extern
int
get_sb_pseudo
(
struct
file_system_type
*
,
char
*
,
extern
struct
dentry
*
mount_pseudo
(
struct
file_system_type
*
,
char
*
,
const
struct
super_operations
*
ops
,
unsigned
long
,
const
struct
super_operations
*
ops
,
unsigned
long
);
struct
vfsmount
*
mnt
);
extern
void
simple_set_mnt
(
struct
vfsmount
*
mnt
,
struct
super_block
*
sb
);
extern
void
simple_set_mnt
(
struct
vfsmount
*
mnt
,
struct
super_block
*
sb
);
static
inline
void
sb_mark_dirty
(
struct
super_block
*
sb
)
static
inline
void
sb_mark_dirty
(
struct
super_block
*
sb
)
...
...
net/socket.c
View file @
51139ada
...
@@ -305,19 +305,17 @@ static const struct super_operations sockfs_ops = {
...
@@ -305,19 +305,17 @@ static const struct super_operations sockfs_ops = {
.
statfs
=
simple_statfs
,
.
statfs
=
simple_statfs
,
};
};
static
int
sockfs_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
sockfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
struct
vfsmount
*
mnt
)
{
{
return
get_sb_pseudo
(
fs_type
,
"socket:"
,
&
sockfs_ops
,
SOCKFS_MAGIC
,
return
mount_pseudo
(
fs_type
,
"socket:"
,
&
sockfs_ops
,
SOCKFS_MAGIC
);
mnt
);
}
}
static
struct
vfsmount
*
sock_mnt
__read_mostly
;
static
struct
vfsmount
*
sock_mnt
__read_mostly
;
static
struct
file_system_type
sock_fs_type
=
{
static
struct
file_system_type
sock_fs_type
=
{
.
name
=
"sockfs"
,
.
name
=
"sockfs"
,
.
get_sb
=
sockfs_get_sb
,
.
mount
=
sockfs_mount
,
.
kill_sb
=
kill_anon_super
,
.
kill_sb
=
kill_anon_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