cifs: wait for writeback to complete in cifs_flush
authorJeff Layton <jlayton@redhat.com>
Fri, 15 Oct 2010 19:34:07 +0000 (15:34 -0400)
committerSteve French <sfrench@us.ibm.com>
Mon, 25 Oct 2010 00:18:59 +0000 (00:18 +0000)
The f_op->flush operation is the last chance to return a writeback
related error when closing a file. Ensure that we don't miss reporting
any errors by waiting for writeback to complete in cifs_flush before
proceeding.

There's no reason to do this when the file isn't open for write
however.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-by: David Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

No differences found