On Fri, 15 Apr 2011 11:52:49 +0400
Pavel Shilovsky <[email protected]> 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 <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html