NFS: Fix a hang/infinite loop in nfs_wb_page()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 21 Mar 2011 19:37:01 +0000 (15:37 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 Mar 2011 01:09:24 +0000 (21:09 -0400)
When one of the two waits in nfs_commit_inode() is interrupted, it
returns a non-negative value, which causes nfs_wb_page() to think
that the operation was successful causing it to busy-loop rather
than exiting.
It also causes nfs_file_fsync() to incorrectly report the file as
being successfully committed to disk.

This patch fixes both problems by ensuring that we return an error
if the attempts to wait fail.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org

No differences found