]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix for bug in handling of errors for O_DIRECT writes
authorNeil Brown <neilb@suse.de>
Tue, 23 Oct 2007 21:09:13 +0000 (17:09 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Oct 2007 23:41:21 +0000 (16:41 -0700)
commitd62414a7125391c9c7a5e428baff4cc6fb7acd7e
tree4418076abd99c105dd0ea68e9d33c2dd2333b6c0
parentf7ff13e44e18e215c01dfb026fdb1d04c9238a17
NFS: Fix for bug in handling of errors for O_DIRECT writes

Commit 76e59f40a2936a323a7fd443496580628c9cc309 ("NFS: Fix error
handling in nfs_direct_write_result()") ensured that if a WRITE returns
an error, then data->res.verf->committed is not tested (as it is not
initialised).

Then commit 92b0d78a78681918bcd269804d8b7023e760d174 ("NFS: Fix two bugs
in the O_DIRECT write code") inadvertently reverted this while fixing
other problems.

So move the test so that we never examine ->committed in an error case,
and fix a speeling error while we are there.

Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfs/direct.c