Re: [PATCH] cifs: Don't use iov_iter::type directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tentatively merged into cifs-2.6.git for-next (pending more of the
usual automated testing we do with the buildbot)

On Thu, Nov 21, 2019 at 2:14 AM David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Don't use iov_iter::type directly, but rather use the new accessor
> functions that have been added.  This allows the .type field to be split
> and rearranged without the need to update the filesystems.
>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> ---
>
>  fs/cifs/file.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index fa7b0fa72bb3..526f2b95332d 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -2833,7 +2833,7 @@ cifs_write_from_iter(loff_t offset, size_t len, struct iov_iter *from,
>                                         "direct_writev couldn't get user pages "
>                                         "(rc=%zd) iter type %d iov_offset %zd "
>                                         "count %zd\n",
> -                                       result, from->type,
> +                                       result, iov_iter_type(from),
>                                         from->iov_offset, from->count);
>                                 dump_stack();
>
> @@ -3044,7 +3044,7 @@ static ssize_t __cifs_writev(
>          * In this case, fall back to non-direct write function.
>          * this could be improved by getting pages directly in ITER_KVEC
>          */
> -       if (direct && from->type & ITER_KVEC) {
> +       if (direct && iov_iter_is_kvec(from)) {
>                 cifs_dbg(FYI, "use non-direct cifs_writev for kvec I/O\n");
>                 direct = false;
>         }
> @@ -3556,7 +3556,7 @@ cifs_send_async_read(loff_t offset, size_t len, struct cifsFileInfo *open_file,
>                                         "couldn't get user pages (rc=%zd)"
>                                         " iter type %d"
>                                         " iov_offset %zd count %zd\n",
> -                                       result, direct_iov.type,
> +                                       result, iov_iter_type(&direct_iov),
>                                         direct_iov.iov_offset,
>                                         direct_iov.count);
>                                 dump_stack();
> @@ -3767,7 +3767,7 @@ static ssize_t __cifs_readv(
>          * fall back to data copy read path
>          * this could be improved by getting pages directly in ITER_KVEC
>          */
> -       if (direct && to->type & ITER_KVEC) {
> +       if (direct && iov_iter_is_kvec(to)) {
>                 cifs_dbg(FYI, "use non-direct cifs_user_readv for kvec I/O\n");
>                 direct = false;
>         }
>


-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux