The patch titled NFS: Fix error handling in nfs_direct_write_result() has been added to the -mm tree. Its filename is nfs-fix-error-handling-in-nfs_direct_write_result.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: NFS: Fix error handling in nfs_direct_write_result() From: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> If the RPC call tanked, we should not be checking the return value of data->res.verf->committed, since it is unlikely to even be initialised. Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/nfs/direct.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff -puN fs/nfs/direct.c~nfs-fix-error-handling-in-nfs_direct_write_result fs/nfs/direct.c --- a/fs/nfs/direct.c~nfs-fix-error-handling-in-nfs_direct_write_result +++ a/fs/nfs/direct.c @@ -532,10 +532,12 @@ static void nfs_direct_write_result(stru spin_lock(&dreq->lock); - if (likely(status >= 0)) - dreq->count += data->res.count; - else - dreq->error = task->tk_status; + if (unlikely(status < 0)) { + dreq->error = status; + goto out_unlock; + } + + dreq->count += data->res.count; if (data->res.verf->committed != NFS_FILE_SYNC) { switch (dreq->flags) { @@ -550,7 +552,7 @@ static void nfs_direct_write_result(stru } } } - +out_unlock: spin_unlock(&dreq->lock); } _ Patches currently in -mm which might be from Trond.Myklebust@xxxxxxxxxx are nfsv4-fix-thinko-in-fs-nfs-superc.patch nfs-fix-oops-in-nfs_cancel_commit_list.patch nfs-fix-error-handling-in-nfs_direct_write_result.patch nfs4-initialize-cl_ipaddr.patch nfs-fix-nfsv4-callback-regression.patch nfs-deal-with-failure-of-invalidate_inode_pages2.patch nfs-fix-minor-bug-in-new-nfs-symlink-code.patch nfs-__nfs_revalidate_inode-can-use-inode-before.patch nfs-remove-unused-check-in-nfs4_open_revalidate.patch sunrpc-fix-race-in-in-kernel-rpc-portmapper-client.patch sunrpc-fix-a-typo.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html