orangefs: wait_for_direct_io(): restore the position in iter when restarting
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 7 Feb 2016 06:25:06 +0000 (01:25 -0500)
committerMike Marshall <hubcap@omnibond.com>
Fri, 12 Feb 2016 20:05:32 +0000 (15:05 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/file.c

index 40b38057b826eff4badd9d8bfa517e0dbac93ce0..c767ec746c76ce4e5e628915e5a2c49c8ac3a4fc 100644 (file)
@@ -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__);
This page took 0.030176 seconds and 5 git commands to generate.