]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
orangefs: use iov_iter_revert()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 13 Apr 2017 07:12:24 +0000 (03:12 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 Apr 2017 17:57:32 +0000 (13:57 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/orangefs/file.c

index e6bbc8083d77235919ee56e093605283bb2d8dbb..1cd37ebc4f25febcefa5baea7f9980353b273d3a 100644 (file)
@@ -114,7 +114,6 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
        struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
        struct orangefs_khandle *handle = &orangefs_inode->refn.khandle;
        struct orangefs_kernel_op_s *new_op = NULL;
-       struct iov_iter saved = *iter;
        int buffer_index = -1;
        ssize_t ret;
 
@@ -193,7 +192,7 @@ populate_shared_memory:
                orangefs_bufmap_put(buffer_index);
                buffer_index = -1;
                if (type == ORANGEFS_IO_WRITE)
-                       *iter = saved;
+                       iov_iter_revert(iter, total_size);
                gossip_debug(GOSSIP_FILE_DEBUG,
                             "%s:going to repopulate_shared_memory.\n",
                             __func__);