Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ee0fc760 authored by Nikhilesh Reddy's avatar Nikhilesh Reddy Committed by Gerrit - the friendly Code Review server
Browse files

fuse: Use iocb->ki_pos instead of pos for shortcircuit writes



Use iocb->ki_pos instead of pos to handle the cases of files that are
opened with O_APPEND. For example if multiple processes open the same
file with O_APPEND then the iocb->ki_pos will not be equal to the new
pos value that is updated with the file size(to guarantee appends even
when the file has grown due to the writes by another process).

We should use iocb->pos here since the lower filesystem is expected to
adjust for O_APPEND anyway and may need to adjust the size for the file
changes that occur due to some processes writing directly to the lower
filesystem.

Change-Id: I279e3ea96cdfd020c45f4cd348f6e1b4bd48a3fb
Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent a435e227
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment