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 16:05:20 -0500
Steve French <smfrench@xxxxxxxxx> wrote:

> On Fri, Mar 23, 2012 at 4:01 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> > 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?
> 
> make modules C=1 M=fs/cifs CF=-D__CHECK_ENDIAN__
> 
> FC16
> 
> [stevef@smf-gateway cifs-2.6]$ gcc --version
> gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)
> Copyright (C) 2011 Free Software Foundation, Inc.
> 
> 

Hrm...I don't see it on my F16 box. Are you on 32 bit arch? If so, that
might be why. In any case, that patch is fine if it silences the
warning for you.

-- 
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