Re: [PATCH 4/5] cifs: add cifs_async_writev

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

 



On Fri, 15 Apr 2011 11:52:49 +0400
Pavel Shilovsky <piastryyy@xxxxxxxxx> wrote:


> >>> > +static void
> >>> > +cifs_writev_complete(struct work_struct *work)
> >>> > +{
> >>> > + Â Â Â struct cifs_writedata *wdata = container_of(work,
> >>> > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct cifs_writedata, work);
> >>> > + Â Â Â struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
> >>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â^^^ this variable is unused.
> >>>
> >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂNot exactly.
> >>
> >>> > + Â Â Â struct inode *inode = wdata->cfile->dentry->d_inode;
> >>> > + Â Â Â struct page *page;
> >>> > + Â Â Â int i = 0;
> >>> > +
> >>> > + Â Â Â if (wdata->result == 0) {
> >>> > + Â Â Â Â Â Â Â cifs_update_eof(CIFS_I(inode), wdata->offset, wdata->bytes);
> >>> > + Â Â Â Â Â Â Â cifs_stats_bytes_written(tcon, wdata->bytes);
> >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ^^^^^
> >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂThe tcon is used here
> >
> > Strange, the compiler (gcc-4.4.4-1ubuntu2) reports it:
> > /home/piastry/git/cifs-2.6/fs/cifs/cifssmb.c: In function
> > âcifs_writev_completeâ:
> > /home/piastry/git/cifs-2.6/fs/cifs/cifssmb.c:1633: warning: unused
> > variable âtconâ
> >
> > but you are right - it is used.
> 
> figured it out: I compiled module without CONFIG_CIFS_STATS.
> 

Ahh yeah, that function gets compiled out to nothing when
CONFIG_CIFS_STATS isn't set. I guess I can get rid of the separate tcon
stack var and just inline the tlink_tcon call there. I'll fix it in my
next set.

Thanks.

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