From: Al Viro Date: Sun, 7 Feb 2016 06:25:06 +0000 (-0500) Subject: orangefs: wait_for_direct_io(): restore the position in iter when restarting X-Git-Tag: v5.15~13906^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b9761af86b63baf4ce304fbdfdb87227d4bfbed;p=platform%2Fkernel%2Flinux-starfive.git orangefs: wait_for_direct_io(): restore the position in iter when restarting Signed-off-by: Al Viro Signed-off-by: Mike Marshall --- diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 40b3805..c767ec7 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -133,6 +133,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod struct orangefs_khandle *handle = &orangefs_inode->refn.khandle; struct orangefs_bufmap *bufmap = NULL; struct orangefs_kernel_op_s *new_op = NULL; + struct iov_iter saved = *iter; int buffer_index = -1; ssize_t ret; @@ -211,6 +212,8 @@ populate_shared_memory: if (ret == -EAGAIN && op_state_purged(new_op)) { orangefs_bufmap_put(bufmap, buffer_index); buffer_index = -1; + if (type == ORANGEFS_IO_WRITE) + *iter = saved; gossip_debug(GOSSIP_FILE_DEBUG, "%s:going to repopulate_shared_memory.\n", __func__);