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
077f48d1
Commit
077f48d1
authored
Feb 07, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Feb 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] knfsd cleanups
nfsd_read() slightly cleaned up.
parent
4c93af34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+4
-2
No files found.
fs/nfsd/vfs.c
View file @
077f48d1
...
@@ -584,6 +584,7 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
...
@@ -584,6 +584,7 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
mm_segment_t
oldfs
;
mm_segment_t
oldfs
;
int
err
;
int
err
;
struct
file
file
;
struct
file
file
;
struct
inode
*
inode
;
err
=
nfsd_open
(
rqstp
,
fhp
,
S_IFREG
,
MAY_READ
,
&
file
);
err
=
nfsd_open
(
rqstp
,
fhp
,
S_IFREG
,
MAY_READ
,
&
file
);
if
(
err
)
if
(
err
)
...
@@ -591,14 +592,15 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
...
@@ -591,14 +592,15 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
err
=
nfserr_perm
;
err
=
nfserr_perm
;
if
(
!
file
.
f_op
->
read
)
if
(
!
file
.
f_op
->
read
)
goto
out_close
;
goto
out_close
;
inode
=
file
.
f_dentry
->
d_inode
;
#ifdef MSNFS
#ifdef MSNFS
if
((
fhp
->
fh_export
->
ex_flags
&
NFSEXP_MSNFS
)
&&
if
((
fhp
->
fh_export
->
ex_flags
&
NFSEXP_MSNFS
)
&&
(
!
lock_may_read
(
file
.
f_dentry
->
d_
inode
,
offset
,
*
count
)))
(
!
lock_may_read
(
inode
,
offset
,
*
count
)))
goto
out_close
;
goto
out_close
;
#endif
#endif
/* Get readahead parameters */
/* Get readahead parameters */
ra
=
nfsd_get_raparms
(
fhp
->
fh_export
->
ex_dev
,
fhp
->
fh_dentry
->
d_
inode
->
i_ino
);
ra
=
nfsd_get_raparms
(
inode
->
i_dev
,
inode
->
i_ino
);
if
(
ra
)
{
if
(
ra
)
{
file
.
f_reada
=
ra
->
p_reada
;
file
.
f_reada
=
ra
->
p_reada
;
file
.
f_ramax
=
ra
->
p_ramax
;
file
.
f_ramax
=
ra
->
p_ramax
;
...
...
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