Re: [PATCH] cifs: cifs_flush should wait for writeback to complete before proceeding

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

 



On Sat, Sep 25, 2010 at 08:16:44AM -0400, Jeff Layton wrote:
> Hmm...there is one problem with this scheme. __fput ignores the error
> return from ->release. Only the errors from ->flush will be returned to
> userspace. So if we only filemap_fdatawait in the ->release op, then we
> have the potential to miss returning writeback-related errors on a
> close call.
> 
> On a side note, why does f_op->release return an int? Are there places
> in the kernel besides __fput that call it? If not, maybe we should
> consider changing it to a void function to make this more clear.

If I remember correctly actually returning errors from ->release
actually caused problems with various bits of userspace software.  I'd
need to check the commit logs for details.  No idea why these problems
don't appear for ->flush or why we've never bothered to change the
->release prototype.
--
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