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
96c1cb5e
Commit
96c1cb5e
authored
Aug 17, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile warning in AFS by passing around "const" types properly.
parent
b3884646
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
fs/afs/super.c
fs/afs/super.c
+13
-7
fs/afs/volume.c
fs/afs/volume.c
+1
-1
fs/afs/volume.h
fs/afs/volume.h
+1
-1
No files found.
fs/afs/super.c
View file @
96c1cb5e
...
@@ -240,7 +240,7 @@ static int want_ipaddr(char **_value, const char *option, struct in_addr *addr)
...
@@ -240,7 +240,7 @@ static int want_ipaddr(char **_value, const char *option, struct in_addr *addr)
* - this function has been shamelessly adapted from the ext3 fs which shamelessly adapted it from
* - this function has been shamelessly adapted from the ext3 fs which shamelessly adapted it from
* the msdos fs
* the msdos fs
*/
*/
static
int
afs_super_parse_options
(
struct
afs_super_info
*
as
,
char
*
options
,
c
har
**
devname
)
static
int
afs_super_parse_options
(
struct
afs_super_info
*
as
,
char
*
options
,
c
onst
char
**
devname
)
{
{
char
*
key
,
*
value
;
char
*
key
,
*
value
;
int
ret
;
int
ret
;
...
@@ -314,6 +314,11 @@ static int afs_super_parse_options(struct afs_super_info *as, char *options, cha
...
@@ -314,6 +314,11 @@ static int afs_super_parse_options(struct afs_super_info *as, char *options, cha
return
ret
;
return
ret
;
}
/* end afs_super_parse_options() */
}
/* end afs_super_parse_options() */
struct
fill_super_options
{
const
char
*
dev_name
;
void
*
options
;
};
/*****************************************************************************/
/*****************************************************************************/
/*
/*
* fill in the superblock
* fill in the superblock
...
@@ -324,8 +329,9 @@ static int afs_fill_super(struct super_block *sb, void *_data, int silent)
...
@@ -324,8 +329,9 @@ static int afs_fill_super(struct super_block *sb, void *_data, int silent)
struct
dentry
*
root
=
NULL
;
struct
dentry
*
root
=
NULL
;
struct
inode
*
inode
=
NULL
;
struct
inode
*
inode
=
NULL
;
afs_fid_t
fid
;
afs_fid_t
fid
;
void
**
data
=
_data
;
struct
fill_super_options
*
data
=
_data
;
char
*
options
,
*
devname
;
const
char
*
devname
;
char
*
options
;
int
ret
;
int
ret
;
_enter
(
""
);
_enter
(
""
);
...
@@ -334,8 +340,8 @@ static int afs_fill_super(struct super_block *sb, void *_data, int silent)
...
@@ -334,8 +340,8 @@ static int afs_fill_super(struct super_block *sb, void *_data, int silent)
_leave
(
" = -EINVAL"
);
_leave
(
" = -EINVAL"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
devname
=
data
[
0
]
;
devname
=
data
->
dev_name
;
options
=
data
[
1
]
;
options
=
data
->
options
;
if
(
options
)
if
(
options
)
options
[
PAGE_SIZE
-
1
]
=
0
;
options
[
PAGE_SIZE
-
1
]
=
0
;
...
@@ -413,7 +419,7 @@ afs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -413,7 +419,7 @@ afs_get_sb(struct file_system_type *fs_type, int flags,
const
char
*
dev_name
,
void
*
options
)
const
char
*
dev_name
,
void
*
options
)
{
{
struct
super_block
*
sb
;
struct
super_block
*
sb
;
void
*
data
[
2
]
=
{
dev_name
,
options
};
struct
fill_super_options
data
=
{
dev_name
,
options
};
int
ret
;
int
ret
;
_enter
(
",,%s,%p"
,
dev_name
,
options
);
_enter
(
",,%s,%p"
,
dev_name
,
options
);
...
@@ -426,7 +432,7 @@ afs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -426,7 +432,7 @@ afs_get_sb(struct file_system_type *fs_type, int flags,
}
}
/* allocate a deviceless superblock */
/* allocate a deviceless superblock */
sb
=
get_sb_nodev
(
fs_type
,
flags
,
data
,
afs_fill_super
);
sb
=
get_sb_nodev
(
fs_type
,
flags
,
&
data
,
afs_fill_super
);
if
(
IS_ERR
(
sb
))
{
if
(
IS_ERR
(
sb
))
{
afscm_stop
();
afscm_stop
();
return
sb
;
return
sb
;
...
...
fs/afs/volume.c
View file @
96c1cb5e
...
@@ -43,7 +43,7 @@ const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
...
@@ -43,7 +43,7 @@ const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
* - Rule 2: If parent volume is R/O, then mount R/O volume by preference, R/W if not available
* - Rule 2: If parent volume is R/O, then mount R/O volume by preference, R/W if not available
* - Rule 3: If parent volume is R/W, then only mount R/W volume unless explicitly told otherwise
* - Rule 3: If parent volume is R/W, then only mount R/W volume unless explicitly told otherwise
*/
*/
int
afs_volume_lookup
(
char
*
name
,
int
rwparent
,
afs_volume_t
**
_volume
)
int
afs_volume_lookup
(
c
onst
c
har
*
name
,
int
rwparent
,
afs_volume_t
**
_volume
)
{
{
afs_vlocation_t
*
vlocation
=
NULL
;
afs_vlocation_t
*
vlocation
=
NULL
;
afs_voltype_t
type
;
afs_voltype_t
type
;
...
...
fs/afs/volume.h
View file @
96c1cb5e
...
@@ -79,7 +79,7 @@ struct afs_volume
...
@@ -79,7 +79,7 @@ struct afs_volume
struct
rw_semaphore
server_sem
;
/* lock for accessing current server */
struct
rw_semaphore
server_sem
;
/* lock for accessing current server */
};
};
extern
int
afs_volume_lookup
(
char
*
name
,
int
ro
,
afs_volume_t
**
_volume
);
extern
int
afs_volume_lookup
(
c
onst
c
har
*
name
,
int
ro
,
afs_volume_t
**
_volume
);
#define afs_get_volume(V) do { atomic_inc(&(V)->usage); } while(0)
#define afs_get_volume(V) do { atomic_inc(&(V)->usage); } while(0)
...
...
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