Re: [PATCH v1 8/8] cifs: convert cifs_iovec_write to use async writes

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

 



On Fri, 23 Mar 2012 15:55:14 -0500
Steve French <smfrench@xxxxxxxxx> wrote:

> Jeff,
> We should cleanup compile warning - was planning to add a tiny patch
> to fix if no objection.
> 
> Look correct?
> 
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index daaaca8..460d87b 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -2114,7 +2114,7 @@ cifs_uncached_marshal_iov(struct kvec *iov,
> struct cifs_writedata *wdata)
> 
>         /* marshal up the pages into iov array */
>         for (i = 0; i < wdata->nr_pages; i++) {
> -               iov[i + 1].iov_len = min(bytes, PAGE_SIZE);
> +               iov[i + 1].iov_len = min_t(size_t, bytes, PAGE_SIZE);
>                 iov[i + 1].iov_base = kmap(wdata->pages[i]);
>                 bytes -= iov[i + 1].iov_len;
>         }
> 

That patch looks harmless, but I don't seem to be able to reproduce any
warnings. Can you elaborate on how you're getting a warning from that?

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux