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
867c4f93
Commit
867c4f93
authored
Feb 11, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs_file_aio_write(): get rid of ppos
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
fcacafd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
fs/btrfs/file.c
fs/btrfs/file.c
+5
-6
No files found.
fs/btrfs/file.c
View file @
867c4f93
...
...
@@ -1631,7 +1631,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
static
ssize_t
__btrfs_direct_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
,
loff_t
*
ppos
,
size_t
count
,
size_t
ocount
)
size_t
count
,
size_t
ocount
)
{
struct
file
*
file
=
iocb
->
ki_filp
;
struct
iov_iter
i
;
...
...
@@ -1640,7 +1640,7 @@ static ssize_t __btrfs_direct_write(struct kiocb *iocb,
loff_t
endbyte
;
int
err
;
written
=
generic_file_direct_write
(
iocb
,
iov
,
&
nr_segs
,
pos
,
p
pos
,
written
=
generic_file_direct_write
(
iocb
,
iov
,
&
nr_segs
,
pos
,
&
iocb
->
ki_
pos
,
count
,
ocount
);
if
(
written
<
0
||
written
==
count
)
...
...
@@ -1659,7 +1659,7 @@ static ssize_t __btrfs_direct_write(struct kiocb *iocb,
if
(
err
)
goto
out
;
written
+=
written_buffered
;
*
p
pos
=
pos
+
written_buffered
;
iocb
->
ki_
pos
=
pos
+
written_buffered
;
invalidate_mapping_pages
(
file
->
f_mapping
,
pos
>>
PAGE_CACHE_SHIFT
,
endbyte
>>
PAGE_CACHE_SHIFT
);
out:
...
...
@@ -1691,7 +1691,6 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
struct
file
*
file
=
iocb
->
ki_filp
;
struct
inode
*
inode
=
file_inode
(
file
);
struct
btrfs_root
*
root
=
BTRFS_I
(
inode
)
->
root
;
loff_t
*
ppos
=
&
iocb
->
ki_pos
;
u64
start_pos
;
ssize_t
num_written
=
0
;
ssize_t
err
=
0
;
...
...
@@ -1759,7 +1758,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
if
(
unlikely
(
file
->
f_flags
&
O_DIRECT
))
{
num_written
=
__btrfs_direct_write
(
iocb
,
iov
,
nr_segs
,
pos
,
ppos
,
count
,
ocount
);
pos
,
count
,
ocount
);
}
else
{
struct
iov_iter
i
;
...
...
@@ -1767,7 +1766,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
num_written
=
__btrfs_buffered_write
(
file
,
&
i
,
pos
);
if
(
num_written
>
0
)
*
p
pos
=
pos
+
num_written
;
iocb
->
ki_
pos
=
pos
+
num_written
;
}
mutex_unlock
(
&
inode
->
i_mutex
);
...
...
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