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
27a5cb49
Commit
27a5cb49
authored
Feb 18, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Feb 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Remove MAX_BLKDEV from nfsd
Patch from Andries.Brouwer@cwi.nl Remove MAX_BLKDEV from nfsd.
parent
3a8280de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
fs/nfsd/nfs3proc.c
fs/nfsd/nfs3proc.c
+3
-4
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4proc.c
+11
-8
No files found.
fs/nfsd/nfs3proc.c
View file @
27a5cb49
...
@@ -317,11 +317,10 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
...
@@ -317,11 +317,10 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
if
(
argp
->
ftype
==
0
||
argp
->
ftype
>=
NF3BAD
)
if
(
argp
->
ftype
==
0
||
argp
->
ftype
>=
NF3BAD
)
RETURN_STATUS
(
nfserr_inval
);
RETURN_STATUS
(
nfserr_inval
);
if
(
argp
->
ftype
==
NF3CHR
||
argp
->
ftype
==
NF3BLK
)
{
if
(
argp
->
ftype
==
NF3CHR
||
argp
->
ftype
==
NF3BLK
)
{
if
((
argp
->
ftype
==
NF3CHR
&&
argp
->
major
>=
MAX_CHRDEV
)
||
(
argp
->
ftype
==
NF3BLK
&&
argp
->
major
>=
MAX_BLKDEV
)
||
argp
->
minor
>
0xFF
)
RETURN_STATUS
(
nfserr_inval
);
rdev
=
MKDEV
(
argp
->
major
,
argp
->
minor
);
rdev
=
MKDEV
(
argp
->
major
,
argp
->
minor
);
if
(
MAJOR
(
rdev
)
!=
argp
->
major
||
MINOR
(
rdev
)
!=
argp
->
minor
)
RETURN_STATUS
(
nfserr_inval
);
}
else
}
else
if
(
argp
->
ftype
!=
NF3SOCK
&&
argp
->
ftype
!=
NF3FIFO
)
if
(
argp
->
ftype
!=
NF3SOCK
&&
argp
->
ftype
!=
NF3FIFO
)
RETURN_STATUS
(
nfserr_inval
);
RETURN_STATUS
(
nfserr_inval
);
...
...
fs/nfsd/nfs4proc.c
View file @
27a5cb49
...
@@ -264,6 +264,7 @@ nfsd4_create(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_cre
...
@@ -264,6 +264,7 @@ nfsd4_create(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_cre
{
{
struct
svc_fh
resfh
;
struct
svc_fh
resfh
;
int
status
;
int
status
;
dev_t
rdev
;
fh_init
(
&
resfh
,
NFS4_FHSIZE
);
fh_init
(
&
resfh
,
NFS4_FHSIZE
);
...
@@ -288,21 +289,23 @@ nfsd4_create(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_cre
...
@@ -288,21 +289,23 @@ nfsd4_create(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_cre
break
;
break
;
case
NF4BLK
:
case
NF4BLK
:
if
(
create
->
cr_specdata1
>=
MAX_BLKDEV
||
create
->
cr_specdata2
>
0xFF
)
rdev
=
MKDEV
(
create
->
cr_specdata1
,
create
->
cr_specdata2
);
if
(
MAJOR
(
rdev
)
!=
create
->
cr_specdata1
||
MINOR
(
rdev
)
!=
create
->
cr_specdata2
)
return
nfserr_inval
;
return
nfserr_inval
;
status
=
nfsd_create
(
rqstp
,
current_fh
,
create
->
cr_name
,
status
=
nfsd_create
(
rqstp
,
current_fh
,
create
->
cr_name
,
create
->
cr_namelen
,
&
create
->
cr_iattr
,
S_IFBLK
,
create
->
cr_namelen
,
&
create
->
cr_iattr
,
MKDEV
(
create
->
cr_specdata1
,
create
->
cr_specdata2
),
S_IFBLK
,
rdev
,
&
resfh
);
&
resfh
);
break
;
break
;
case
NF4CHR
:
case
NF4CHR
:
if
(
create
->
cr_specdata1
>=
MAX_CHRDEV
||
create
->
cr_specdata2
>
0xFF
)
rdev
=
MKDEV
(
create
->
cr_specdata1
,
create
->
cr_specdata2
);
if
(
MAJOR
(
rdev
)
!=
create
->
cr_specdata1
||
MINOR
(
rdev
)
!=
create
->
cr_specdata2
)
return
nfserr_inval
;
return
nfserr_inval
;
status
=
nfsd_create
(
rqstp
,
current_fh
,
create
->
cr_name
,
status
=
nfsd_create
(
rqstp
,
current_fh
,
create
->
cr_name
,
create
->
cr_namelen
,
&
create
->
cr_iattr
,
S_IFCHR
,
create
->
cr_namelen
,
&
create
->
cr_iattr
,
MKDEV
(
create
->
cr_specdata1
,
create
->
cr_specdata2
),
S_IFCHR
,
rdev
,
&
resfh
);
&
resfh
);
break
;
break
;
case
NF4SOCK
:
case
NF4SOCK
:
...
...
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