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
71aa96e9
Commit
71aa96e9
authored
Apr 16, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/davem/BK/tg3-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
c6026d08
cbbf50f0
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
242 additions
and
66 deletions
+242
-66
drivers/firmware/edd.c
drivers/firmware/edd.c
+110
-57
drivers/ide/ide-probe.c
drivers/ide/ide-probe.c
+2
-1
fs/adfs/super.c
fs/adfs/super.c
+1
-0
fs/affs/super.c
fs/affs/super.c
+2
-0
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+7
-0
fs/coda/inode.c
fs/coda/inode.c
+7
-0
fs/cramfs/inode.c
fs/cramfs/inode.c
+7
-0
fs/efs/super.c
fs/efs/super.c
+7
-0
fs/fat/inode.c
fs/fat/inode.c
+7
-0
fs/freevxfs/vxfs_super.c
fs/freevxfs/vxfs_super.c
+8
-0
fs/hfs/super.c
fs/hfs/super.c
+1
-0
fs/isofs/inode.c
fs/isofs/inode.c
+8
-0
fs/jffs/inode-v23.c
fs/jffs/inode-v23.c
+7
-0
fs/jffs2/fs.c
fs/jffs2/fs.c
+1
-1
fs/jffs2/super.c
fs/jffs2/super.c
+1
-1
fs/namespace.c
fs/namespace.c
+1
-1
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+7
-0
fs/openpromfs/inode.c
fs/openpromfs/inode.c
+8
-1
fs/proc/inode.c
fs/proc/inode.c
+7
-0
fs/qnx4/inode.c
fs/qnx4/inode.c
+4
-0
fs/romfs/inode.c
fs/romfs/inode.c
+7
-0
fs/smbfs/inode.c
fs/smbfs/inode.c
+7
-0
fs/sysv/inode.c
fs/sysv/inode.c
+11
-0
fs/sysv/super.c
fs/sysv/super.c
+5
-3
fs/sysv/sysv.h
fs/sysv/sysv.h
+1
-0
fs/udf/super.c
fs/udf/super.c
+6
-0
mm/mprotect.c
mm/mprotect.c
+2
-1
No files found.
drivers/firmware/edd.c
View file @
71aa96e9
...
...
@@ -125,13 +125,15 @@ static struct sysfs_ops edd_attr_ops = {
static
ssize_t
edd_show_host_bus
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
int
i
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
isprint
(
info
->
params
.
host_bus_type
[
i
]))
{
...
...
@@ -169,13 +171,15 @@ edd_show_host_bus(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_interface
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
int
i
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
isprint
(
info
->
params
.
interface_type
[
i
]))
{
...
...
@@ -231,11 +235,13 @@ edd_show_interface(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_raw_data
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
ssize_t
len
=
sizeof
(
info
->
params
);
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
if
(
!
(
info
->
params
.
key
==
0xBEDD
||
info
->
params
.
key
==
0xDDBE
))
len
=
info
->
params
.
length
;
...
...
@@ -251,11 +257,13 @@ edd_show_raw_data(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_version
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
scnprintf
(
p
,
left
,
"0x%02x
\n
"
,
info
->
version
);
return
(
p
-
buf
);
...
...
@@ -272,11 +280,13 @@ edd_show_disk80_sig(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_extensions
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
if
(
info
->
interface_support
&
EDD_EXT_FIXED_DISK_ACCESS
)
{
p
+=
scnprintf
(
p
,
left
,
"Fixed disk access
\n
"
);
...
...
@@ -296,11 +306,13 @@ edd_show_extensions(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_info_flags
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
if
(
info
->
params
.
info_flags
&
EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT
)
p
+=
scnprintf
(
p
,
left
,
"DMA boundary error transparent
\n
"
);
...
...
@@ -324,11 +336,13 @@ edd_show_info_flags(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_legacy_cylinders
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
snprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
legacy_cylinders
);
return
(
p
-
buf
);
...
...
@@ -337,11 +351,13 @@ edd_show_legacy_cylinders(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_legacy_heads
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
snprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
legacy_heads
);
return
(
p
-
buf
);
...
...
@@ -350,11 +366,13 @@ edd_show_legacy_heads(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_legacy_sectors
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
snprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
legacy_sectors
);
return
(
p
-
buf
);
...
...
@@ -363,11 +381,13 @@ edd_show_legacy_sectors(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_default_cylinders
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
scnprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
params
.
num_default_cylinders
);
return
(
p
-
buf
);
...
...
@@ -376,11 +396,13 @@ edd_show_default_cylinders(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_default_heads
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
scnprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
params
.
num_default_heads
);
return
(
p
-
buf
);
...
...
@@ -389,11 +411,13 @@ edd_show_default_heads(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_default_sectors_per_track
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
scnprintf
(
p
,
left
,
"0x%x
\n
"
,
info
->
params
.
sectors_per_track
);
return
(
p
-
buf
);
...
...
@@ -402,11 +426,13 @@ edd_show_default_sectors_per_track(struct edd_device *edev, char *buf)
static
ssize_t
edd_show_sectors
(
struct
edd_device
*
edev
,
char
*
buf
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
char
*
p
=
buf
;
if
(
!
edev
||
!
info
||
!
buf
)
{
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
||
!
buf
)
return
-
EINVAL
;
}
p
+=
scnprintf
(
p
,
left
,
"0x%llx
\n
"
,
info
->
params
.
number_of_sectors
);
return
(
p
-
buf
);
...
...
@@ -426,8 +452,11 @@ edd_show_sectors(struct edd_device *edev, char *buf)
static
int
edd_has_legacy_cylinders
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
legacy_cylinders
>
0
;
}
...
...
@@ -435,8 +464,11 @@ edd_has_legacy_cylinders(struct edd_device *edev)
static
int
edd_has_legacy_heads
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
legacy_heads
>
0
;
}
...
...
@@ -444,8 +476,11 @@ edd_has_legacy_heads(struct edd_device *edev)
static
int
edd_has_legacy_sectors
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
legacy_sectors
>
0
;
}
...
...
@@ -453,8 +488,11 @@ edd_has_legacy_sectors(struct edd_device *edev)
static
int
edd_has_default_cylinders
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
params
.
num_default_cylinders
>
0
;
}
...
...
@@ -462,8 +500,11 @@ edd_has_default_cylinders(struct edd_device *edev)
static
int
edd_has_default_heads
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
params
.
num_default_heads
>
0
;
}
...
...
@@ -471,8 +512,11 @@ edd_has_default_heads(struct edd_device *edev)
static
int
edd_has_default_sectors_per_track
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
-
EINVAL
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
-
EINVAL
;
return
info
->
params
.
sectors_per_track
>
0
;
}
...
...
@@ -480,11 +524,14 @@ edd_has_default_sectors_per_track(struct edd_device *edev)
static
int
edd_has_edd30
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
)
;
struct
edd_info
*
info
;
int
i
,
nonzero_path
=
0
;
char
c
;
if
(
!
edev
||
!
info
)
if
(
!
edev
)
return
0
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
0
;
if
(
!
(
info
->
params
.
key
==
0xBEDD
||
info
->
params
.
key
==
0xDDBE
))
{
...
...
@@ -508,8 +555,11 @@ edd_has_edd30(struct edd_device *edev)
static
int
edd_has_disk80_sig
(
struct
edd_device
*
edev
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
if
(
!
edev
||
!
info
)
struct
edd_info
*
info
;
if
(
!
edev
)
return
0
;
info
=
edd_dev_get_info
(
edev
);
if
(
!
info
)
return
0
;
return
info
->
device
==
0x80
;
}
...
...
@@ -597,9 +647,12 @@ static decl_subsys(edd,&ktype_edd,NULL);
static
int
edd_dev_is_type
(
struct
edd_device
*
edev
,
const
char
*
type
)
{
struct
edd_info
*
info
=
edd_dev_get_info
(
edev
);
struct
edd_info
*
info
;
if
(
!
edev
)
return
0
;
info
=
edd_dev_get_info
(
edev
);
if
(
edev
&&
type
&&
info
)
{
if
(
type
&&
info
)
{
if
(
!
strncmp
(
info
->
params
.
host_bus_type
,
type
,
strlen
(
type
))
||
!
strncmp
(
info
->
params
.
interface_type
,
type
,
strlen
(
type
)))
return
1
;
...
...
drivers/ide/ide-probe.c
View file @
71aa96e9
...
...
@@ -103,7 +103,8 @@ static inline int drive_is_flashcard (ide_drive_t *drive)
if
(
id
->
config
==
0x848a
)
return
1
;
/* CompactFlash */
if
(
!
strncmp
(
id
->
model
,
"KODAK ATA_FLASH"
,
15
)
/* Kodak */
||
!
strncmp
(
id
->
model
,
"Hitachi CV"
,
10
)
/* Hitachi */
||
!
strncmp
(
id
->
model
,
"SunDisk SDCFB"
,
13
)
/* SunDisk */
||
!
strncmp
(
id
->
model
,
"SunDisk SDCFB"
,
13
)
/* old SanDisk */
||
!
strncmp
(
id
->
model
,
"SanDisk SDCFB"
,
13
)
/* SanDisk */
||
!
strncmp
(
id
->
model
,
"HAGIWARA HPC"
,
12
)
/* Hagiwara */
||
!
strncmp
(
id
->
model
,
"LEXAR ATA_FLASH"
,
15
)
/* Lexar */
||
!
strncmp
(
id
->
model
,
"ATA_FLASH"
,
9
))
/* Simple Tech */
...
...
fs/adfs/super.c
View file @
71aa96e9
...
...
@@ -192,6 +192,7 @@ static int parse_options(struct super_block *sb, char *options)
static
int
adfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
parse_options
(
sb
,
data
);
}
...
...
fs/affs/super.c
View file @
71aa96e9
...
...
@@ -502,6 +502,8 @@ affs_remount(struct super_block *sb, int *flags, char *data)
pr_debug
(
"AFFS: remount(flags=0x%x,opts=
\"
%s
\"
)
\n
"
,
*
flags
,
data
);
*
flags
|=
MS_NODIRATIME
;
if
(
!
parse_options
(
data
,
&
uid
,
&
gid
,
&
mode
,
&
reserved
,
&
root_block
,
&
blocksize
,
&
sbi
->
s_prefix
,
sbi
->
s_volume
,
&
mount_flags
))
return
-
EINVAL
;
...
...
fs/cifs/cifsfs.c
View file @
71aa96e9
...
...
@@ -357,6 +357,12 @@ static struct quotactl_ops cifs_quotactl_ops = {
};
#endif
static
int
cifs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
struct
super_operations
cifs_super_ops
=
{
.
read_inode
=
cifs_read_inode
,
.
put_super
=
cifs_put_super
,
...
...
@@ -369,6 +375,7 @@ struct super_operations cifs_super_ops = {
us with the same number of releases (closes) as opens */
.
show_options
=
cifs_show_options
,
/* .umount_begin = cifs_umount_begin, *//* consider adding in the future */
.
remount_fs
=
cifs_remount
,
};
static
struct
super_block
*
...
...
fs/coda/inode.c
View file @
71aa96e9
...
...
@@ -82,6 +82,12 @@ void coda_destroy_inodecache(void)
printk
(
KERN_INFO
"coda_inode_cache: not all structures were freed
\n
"
);
}
static
int
coda_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
/* exported operations */
struct
super_operations
coda_super_operations
=
{
...
...
@@ -90,6 +96,7 @@ struct super_operations coda_super_operations =
.
clear_inode
=
coda_clear_inode
,
.
put_super
=
coda_put_super
,
.
statfs
=
coda_statfs
,
.
remount_fs
=
coda_remount
,
};
static
int
get_device_index
(
struct
coda_mount_data
*
data
)
...
...
fs/cramfs/inode.c
View file @
71aa96e9
...
...
@@ -193,6 +193,12 @@ static void cramfs_put_super(struct super_block *sb)
sb
->
s_fs_info
=
NULL
;
}
static
int
cramfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_RDONLY
;
return
0
;
}
static
int
cramfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
int
i
;
...
...
@@ -483,6 +489,7 @@ static struct inode_operations cramfs_dir_inode_operations = {
static
struct
super_operations
cramfs_ops
=
{
.
put_super
=
cramfs_put_super
,
.
remount_fs
=
cramfs_remount
,
.
statfs
=
cramfs_statfs
,
};
...
...
fs/efs/super.c
View file @
71aa96e9
...
...
@@ -77,12 +77,19 @@ void efs_put_super(struct super_block *s)
s
->
s_fs_info
=
NULL
;
}
static
int
efs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_RDONLY
;
return
0
;
}
static
struct
super_operations
efs_superblock_operations
=
{
.
alloc_inode
=
efs_alloc_inode
,
.
destroy_inode
=
efs_destroy_inode
,
.
read_inode
=
efs_read_inode
,
.
put_super
=
efs_put_super
,
.
statfs
=
efs_statfs
,
.
remount_fs
=
efs_remount
,
};
static
int
__init
init_efs_fs
(
void
)
{
...
...
fs/fat/inode.c
View file @
71aa96e9
...
...
@@ -734,6 +734,12 @@ void __exit fat_destroy_inodecache(void)
printk
(
KERN_INFO
"fat_inode_cache: not all structures were freed
\n
"
);
}
static
int
fat_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
static
struct
super_operations
fat_sops
=
{
.
alloc_inode
=
fat_alloc_inode
,
.
destroy_inode
=
fat_destroy_inode
,
...
...
@@ -742,6 +748,7 @@ static struct super_operations fat_sops = {
.
put_super
=
fat_put_super
,
.
statfs
=
fat_statfs
,
.
clear_inode
=
fat_clear_inode
,
.
remount_fs
=
fat_remount
,
.
read_inode
=
make_bad_inode
,
...
...
fs/freevxfs/vxfs_super.c
View file @
71aa96e9
...
...
@@ -56,12 +56,14 @@ MODULE_ALIAS("vxfs"); /* makes mount -t vxfs autoload the module */
static
void
vxfs_put_super
(
struct
super_block
*
);
static
int
vxfs_statfs
(
struct
super_block
*
,
struct
kstatfs
*
);
static
int
vxfs_remount
(
struct
super_block
*
,
int
*
,
char
*
);
static
struct
super_operations
vxfs_super_ops
=
{
.
read_inode
=
vxfs_read_inode
,
.
put_inode
=
vxfs_put_inode
,
.
put_super
=
vxfs_put_super
,
.
statfs
=
vxfs_statfs
,
.
remount_fs
=
vxfs_remount
,
};
/**
...
...
@@ -121,6 +123,12 @@ vxfs_statfs(struct super_block *sbp, struct kstatfs *bufp)
return
0
;
}
static
int
vxfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_RDONLY
;
return
0
;
}
/**
* vxfs_read_super - read superblock into memory and initalize filesystem
* @sbp: VFS superblock (to fill)
...
...
fs/hfs/super.c
View file @
71aa96e9
...
...
@@ -94,6 +94,7 @@ static int hfs_statfs(struct super_block *sb, struct kstatfs *buf)
int
hfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
if
((
*
flags
&
MS_RDONLY
)
==
(
sb
->
s_flags
&
MS_RDONLY
))
return
0
;
if
(
!
(
*
flags
&
MS_RDONLY
))
{
...
...
fs/isofs/inode.c
View file @
71aa96e9
...
...
@@ -119,12 +119,20 @@ static void destroy_inodecache(void)
printk
(
KERN_INFO
"iso_inode_cache: not all structures were freed
\n
"
);
}
static
int
isofs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
/* we probably want a lot more here */
*
flags
|=
MS_RDONLY
;
return
0
;
}
static
struct
super_operations
isofs_sops
=
{
.
alloc_inode
=
isofs_alloc_inode
,
.
destroy_inode
=
isofs_destroy_inode
,
.
read_inode
=
isofs_read_inode
,
.
put_super
=
isofs_put_super
,
.
statfs
=
isofs_statfs
,
.
remount_fs
=
isofs_remount
,
};
/* the export_operations structure for describing
...
...
fs/jffs/inode-v23.c
View file @
71aa96e9
...
...
@@ -1771,6 +1771,12 @@ jffs_write_super(struct super_block *sb)
unlock_kernel
();
}
static
int
jffs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
static
struct
super_operations
jffs_ops
=
{
.
read_inode
=
jffs_read_inode
,
...
...
@@ -1778,6 +1784,7 @@ static struct super_operations jffs_ops =
.
put_super
=
jffs_put_super
,
.
write_super
=
jffs_write_super
,
.
statfs
=
jffs_statfs
,
.
remount_fs
=
jffs_remount
,
};
static
struct
super_block
*
jffs_get_sb
(
struct
file_system_type
*
fs_type
,
...
...
fs/jffs2/fs.c
View file @
71aa96e9
...
...
@@ -350,7 +350,7 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
if
(
!
(
*
flags
&
MS_RDONLY
))
jffs2_start_garbage_collect_thread
(
c
);
sb
->
s_flags
=
(
sb
->
s_flags
&
~
MS_RDONLY
)
|
(
*
flags
&
MS_RDONLY
)
;
*
flags
|=
MS_NOATIME
;
return
0
;
}
...
...
fs/jffs2/super.c
View file @
71aa96e9
...
...
@@ -129,7 +129,7 @@ static struct super_block *jffs2_get_sb_mtd(struct file_system_type *fs_type,
mtd
->
index
,
mtd
->
name
));
sb
->
s_op
=
&
jffs2_super_operations
;
sb
->
s_flags
|=
MS_NO
DIR
ATIME
;
sb
->
s_flags
|=
MS_NOATIME
;
ret
=
jffs2_do_fill_super
(
sb
,
data
,
(
flags
&
MS_VERBOSE
)
?
1
:
0
);
...
...
fs/namespace.c
View file @
71aa96e9
...
...
@@ -777,7 +777,7 @@ long do_mount(char * dev_name, char * dir_name, char *type_page,
mnt_flags
|=
MNT_NODEV
;
if
(
flags
&
MS_NOEXEC
)
mnt_flags
|=
MNT_NOEXEC
;
flags
&=
~
(
MS_NOSUID
|
MS_NOEXEC
|
MS_NODEV
);
flags
&=
~
(
MS_NOSUID
|
MS_NOEXEC
|
MS_NODEV
|
MS_ACTIVE
);
/* ... and get the mountpoint */
retval
=
path_lookup
(
dir_name
,
LOOKUP_FOLLOW
,
&
nd
);
...
...
fs/ncpfs/inode.c
View file @
71aa96e9
...
...
@@ -85,6 +85,12 @@ static void destroy_inodecache(void)
printk
(
KERN_INFO
"ncp_inode_cache: not all structures were freed
\n
"
);
}
static
int
ncp_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
static
struct
super_operations
ncp_sops
=
{
.
alloc_inode
=
ncp_alloc_inode
,
...
...
@@ -93,6 +99,7 @@ static struct super_operations ncp_sops =
.
delete_inode
=
ncp_delete_inode
,
.
put_super
=
ncp_put_super
,
.
statfs
=
ncp_statfs
,
.
remount_fs
=
ncp_remount
,
};
extern
struct
dentry_operations
ncp_root_dentry_operations
;
...
...
fs/openpromfs/inode.c
View file @
71aa96e9
...
...
@@ -1018,16 +1018,23 @@ static void openprom_read_inode(struct inode * inode)
}
}
static
int
openprom_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NOATIME
;
return
0
;
}
static
struct
super_operations
openprom_sops
=
{
.
read_inode
=
openprom_read_inode
,
.
statfs
=
simple_statfs
,
.
remount
=
openprom_remount
,
};
static
int
openprom_fill_super
(
struct
super_block
*
s
,
void
*
data
,
int
silent
)
{
struct
inode
*
root_inode
;
s
->
s_flags
|=
MS_NO
DIR
ATIME
;
s
->
s_flags
|=
MS_NOATIME
;
s
->
s_blocksize
=
1024
;
s
->
s_blocksize_bits
=
10
;
s
->
s_magic
=
OPENPROM_SUPER_MAGIC
;
...
...
fs/proc/inode.c
View file @
71aa96e9
...
...
@@ -127,6 +127,12 @@ int __init proc_init_inodecache(void)
return
0
;
}
static
int
proc_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
static
struct
super_operations
proc_sops
=
{
.
alloc_inode
=
proc_alloc_inode
,
.
destroy_inode
=
proc_destroy_inode
,
...
...
@@ -134,6 +140,7 @@ static struct super_operations proc_sops = {
.
drop_inode
=
generic_delete_inode
,
.
delete_inode
=
proc_delete_inode
,
.
statfs
=
simple_statfs
,
.
remount_fs
=
proc_remount
,
};
enum
{
...
...
fs/qnx4/inode.c
View file @
71aa96e9
...
...
@@ -149,9 +149,13 @@ static int qnx4_remount(struct super_block *sb, int *flags, char *data)
qs
=
qnx4_sb
(
sb
);
qs
->
Version
=
QNX4_VERSION
;
#ifndef CONFIG_QNX4FS_RW
*
flags
|=
MS_RDONLY
;
#endif
if
(
*
flags
&
MS_RDONLY
)
{
return
0
;
}
mark_buffer_dirty
(
qs
->
sb_buf
);
return
0
;
...
...
fs/romfs/inode.c
View file @
71aa96e9
...
...
@@ -592,11 +592,18 @@ static void destroy_inodecache(void)
printk
(
KERN_INFO
"romfs_inode_cache: not all structures were freed
\n
"
);
}
static
int
romfs_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_RDONLY
;
return
0
;
}
static
struct
super_operations
romfs_ops
=
{
.
alloc_inode
=
romfs_alloc_inode
,
.
destroy_inode
=
romfs_destroy_inode
,
.
read_inode
=
romfs_read_inode
,
.
statfs
=
romfs_statfs
,
.
remount_fs
=
romfs_remount
,
};
static
struct
super_block
*
romfs_get_sb
(
struct
file_system_type
*
fs_type
,
...
...
fs/smbfs/inode.c
View file @
71aa96e9
...
...
@@ -93,6 +93,12 @@ static void destroy_inodecache(void)
printk
(
KERN_INFO
"smb_inode_cache: not all structures were freed
\n
"
);
}
static
int
smb_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
*
flags
|=
MS_NODIRATIME
;
return
0
;
}
static
struct
super_operations
smb_sops
=
{
.
alloc_inode
=
smb_alloc_inode
,
...
...
@@ -102,6 +108,7 @@ static struct super_operations smb_sops =
.
put_super
=
smb_put_super
,
.
statfs
=
smb_statfs
,
.
show_options
=
smb_show_options
,
.
remount_fs
=
smb_remount
,
};
...
...
fs/sysv/inode.c
View file @
71aa96e9
...
...
@@ -57,6 +57,16 @@ static void sysv_write_super(struct super_block *sb)
unlock_kernel
();
}
static
int
sysv_remount
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
);
if
(
sbi
->
s_forced_ro
)
*
flags
|=
MS_RDONLY
;
if
(
!
(
*
flags
&
MS_RDONLY
))
sb
->
s_dirt
=
1
;
return
0
;
}
static
void
sysv_put_super
(
struct
super_block
*
sb
)
{
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
);
...
...
@@ -321,6 +331,7 @@ struct super_operations sysv_sops = {
.
delete_inode
=
sysv_delete_inode
,
.
put_super
=
sysv_put_super
,
.
write_super
=
sysv_write_super
,
.
remount_fs
=
sysv_remount
,
.
statfs
=
sysv_statfs
,
};
...
...
fs/sysv/super.c
View file @
71aa96e9
...
...
@@ -206,11 +206,11 @@ static int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh)
if
(
fs16_to_cpu
(
sbi
,
sbd
->
s_nfree
)
==
0xffff
)
{
sbi
->
s_type
=
FSTYPE_AFS
;
sbi
->
s_forced_ro
=
1
;
if
(
!
(
sb
->
s_flags
&
MS_RDONLY
))
{
printk
(
"SysV FS: SCO EAFS on %s detected, "
"forcing read-only mode.
\n
"
,
sb
->
s_id
);
sb
->
s_flags
|=
MS_RDONLY
;
}
return
sbd
->
s_type
;
}
...
...
@@ -234,7 +234,7 @@ static int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh)
if
(
sbd
->
s_type
>=
0x10
)
{
printk
(
"SysV FS: can't handle long file names on %s, "
"forcing read-only mode.
\n
"
,
sb
->
s_id
);
sb
->
s_flags
|=
MS_RDONLY
;
sb
i
->
s_forced_ro
=
1
;
}
sbi
->
s_type
=
FSTYPE_SYSV4
;
...
...
@@ -335,9 +335,10 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
printk
(
"SysV FS: get root dentry failed
\n
"
);
return
0
;
}
if
(
sbi
->
s_forced_ro
)
sb
->
s_flags
|=
MS_RDONLY
;
if
(
sbi
->
s_truncate
)
sb
->
s_root
->
d_op
=
&
sysv_dentry_operations
;
sb
->
s_flags
|=
MS_RDONLY
;
sb
->
s_dirt
=
1
;
return
1
;
}
...
...
@@ -481,6 +482,7 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
(
fs32_to_cpu
(
sbi
,
v7i
->
i_size
)
&
017
)
!=
0
)
goto
failed
;
brelse
(
bh2
);
bh2
=
NULL
;
sbi
->
s_bh1
=
bh
;
sbi
->
s_bh2
=
bh
;
...
...
fs/sysv/sysv.h
View file @
71aa96e9
...
...
@@ -54,6 +54,7 @@ struct sysv_sb_info {
u32
s_ndatazones
;
/* total number of data zones */
u32
s_nzones
;
/* same as s_sbd->s_fsize */
u16
s_namelen
;
/* max length of dir entry */
int
s_forced_ro
;
};
/*
...
...
fs/udf/super.c
View file @
71aa96e9
...
...
@@ -460,6 +460,12 @@ udf_remount_fs(struct super_block *sb, int *flags, char *options)
UDF_SB
(
sb
)
->
s_gid
=
uopt
.
gid
;
UDF_SB
(
sb
)
->
s_umask
=
uopt
.
umask
;
if
(
UDF_SB_LVIDBH
(
sb
))
{
int
write_rev
=
le16_to_cpu
(
UDF_SB_LVIDIU
(
sb
)
->
minUDFWriteRev
);
if
(
write_rev
>
UDF_MAX_WRITE_VERSION
)
*
flags
|=
MS_RDONLY
;
}
if
((
*
flags
&
MS_RDONLY
)
==
(
sb
->
s_flags
&
MS_RDONLY
))
return
0
;
if
(
*
flags
&
MS_RDONLY
)
...
...
mm/mprotect.c
View file @
71aa96e9
...
...
@@ -114,10 +114,11 @@ static int
mprotect_attempt_merge
(
struct
vm_area_struct
*
vma
,
struct
vm_area_struct
*
prev
,
unsigned
long
end
,
int
newflags
)
{
struct
mm_struct
*
mm
=
vma
->
vm_mm
;
struct
mm_struct
*
mm
;
if
(
!
prev
||
!
vma
)
return
0
;
mm
=
vma
->
vm_mm
;
if
(
prev
->
vm_end
!=
vma
->
vm_start
)
return
0
;
if
(
!
can_vma_merge
(
prev
,
newflags
))
...
...
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