Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-seco-intel
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicola Sparnacci
linux-seco-intel
Commits
2142914e
Commit
2142914e
authored
11 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
lseek_execute() doesn't need an inode passed to it
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5d48f3a2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/read_write.c
+3
-7
3 additions, 7 deletions
fs/read_write.c
with
3 additions
and
7 deletions
fs/read_write.c
+
3
−
7
View file @
2142914e
...
@@ -41,8 +41,7 @@ static inline int unsigned_offsets(struct file *file)
...
@@ -41,8 +41,7 @@ static inline int unsigned_offsets(struct file *file)
return
file
->
f_mode
&
FMODE_UNSIGNED_OFFSET
;
return
file
->
f_mode
&
FMODE_UNSIGNED_OFFSET
;
}
}
static
loff_t
lseek_execute
(
struct
file
*
file
,
struct
inode
*
inode
,
static
loff_t
lseek_execute
(
struct
file
*
file
,
loff_t
offset
,
loff_t
maxsize
)
loff_t
offset
,
loff_t
maxsize
)
{
{
if
(
offset
<
0
&&
!
unsigned_offsets
(
file
))
if
(
offset
<
0
&&
!
unsigned_offsets
(
file
))
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -76,8 +75,6 @@ loff_t
...
@@ -76,8 +75,6 @@ loff_t
generic_file_llseek_size
(
struct
file
*
file
,
loff_t
offset
,
int
whence
,
generic_file_llseek_size
(
struct
file
*
file
,
loff_t
offset
,
int
whence
,
loff_t
maxsize
,
loff_t
eof
)
loff_t
maxsize
,
loff_t
eof
)
{
{
struct
inode
*
inode
=
file
->
f_mapping
->
host
;
switch
(
whence
)
{
switch
(
whence
)
{
case
SEEK_END
:
case
SEEK_END
:
offset
+=
eof
;
offset
+=
eof
;
...
@@ -97,8 +94,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
...
@@ -97,8 +94,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
* like SEEK_SET.
* like SEEK_SET.
*/
*/
spin_lock
(
&
file
->
f_lock
);
spin_lock
(
&
file
->
f_lock
);
offset
=
lseek_execute
(
file
,
inode
,
file
->
f_pos
+
offset
,
offset
=
lseek_execute
(
file
,
file
->
f_pos
+
offset
,
maxsize
);
maxsize
);
spin_unlock
(
&
file
->
f_lock
);
spin_unlock
(
&
file
->
f_lock
);
return
offset
;
return
offset
;
case
SEEK_DATA
:
case
SEEK_DATA
:
...
@@ -120,7 +116,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
...
@@ -120,7 +116,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
break
;
break
;
}
}
return
lseek_execute
(
file
,
inode
,
offset
,
maxsize
);
return
lseek_execute
(
file
,
offset
,
maxsize
);
}
}
EXPORT_SYMBOL
(
generic_file_llseek_size
);
EXPORT_SYMBOL
(
generic_file_llseek_size
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment