Re: [PATCH 13/13] cifs: eliminate cifsInodeInfo->write_behind_rc

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

 



On Fri, 22 Oct 2010 13:11:30 -0500
Dave Kleikamp <shaggy@xxxxxxxxxxxxxxxxxx> wrote:

> On Fri, 2010-10-15 at 15:34 -0400, Jeff Layton wrote:
> > write_behind_rc is redundant and just adds complexity to the code. What
> > we really want to do instead is to use mapping_set_error to reset the
> > flags on the mapping when we find a writeback error and can't report it
> > to userspace yet.
> > 
> > For cifs_flush and cifs_fsync, we shouldn't reset the flags since errors
> > returned there do get reported to userspace.
> > 
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > Reviewed-by: Suresh Jayaraman <sjayaraman@xxxxxxx>
> > ---
> >  fs/cifs/cifsfs.c   |    1 -
> >  fs/cifs/cifsglob.h |    1 -
> >  fs/cifs/file.c     |   34 ++++++++--------------------------
> >  fs/cifs/inode.c    |   15 +++++----------
> >  4 files changed, 13 insertions(+), 38 deletions(-)
> 
>   --- snip ---
> 
> > @@ -1639,10 +1632,8 @@ int cifs_fsync(struct file *file, int datasync)
> > 
> >  	rc = filemap_write_and_wait(inode->i_mapping);
> >  	if (rc == 0) {
> > -		rc = CIFS_I(inode)->write_behind_rc;
> > -		CIFS_I(inode)->write_behind_rc = 0;
> >  		tcon = tlink_tcon(smbfile->tlink);
> > -		if (!rc && tcon && smbfile &&
> > +		if (rc == 0 &&
> 
> The above is redundant now, isn't it?  We no longer set rc since the
> last test.
> 
> >  		   !(CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_NOSSYNC))
> >  			rc = CIFSSMBFlush(xid, tcon, smbfile->netfid);
> >  	}
> 

Yeah, duh. Good catch.

Steve, should I respin that one?

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