]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFS: commit direct writes even if they fail partially
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 16 Jan 2018 15:08:00 +0000 (10:08 -0500)
committerBrian Maly <brian.maly@oracle.com>
Wed, 6 Mar 2019 03:36:50 +0000 (22:36 -0500)
commit0226948420ecb7590a228f4575c6228e316866fe
tree50d5501a2ea88037a1f5bf4329259ffc458c87ca
parent7d3d00fa8582608951aaa6e8a4ed0caeab82aa0e
NFS: commit direct writes even if they fail partially

If some of the WRITE calls making up an O_DIRECT write syscall fail,
we neglect to commit, even if some of the WRITEs succeed.

We also depend on the commit code to free the reference count on the
nfs_page taken in the "if (request_commit)" case at the end of
nfs_direct_write_completion().  The problem was originally noticed
because ENOSPC's encountered partway through a write would result in a
closed file being sillyrenamed when it should have been unlinked.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
(cherry picked from commit 1b8d97b0a837beaf48a8449955b52c650a7114b4)

Orabug: 28212440
Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
Reviewed-by: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
fs/nfs/direct.c