Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39978
b: refs/heads/master
c: eda3cef
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Oct 20, 2006
1 parent b6515d5 commit 6d4a314
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6dff26a08189932eeb0fa4261e09e733b0fc540
refs/heads/master: eda3cef8dd2b83875affe82595db9d0c278879b2
12 changes: 7 additions & 5 deletions trunk/fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,12 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata)

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) {
Expand All @@ -550,7 +552,7 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata)
}
}
}

out_unlock:
spin_unlock(&dreq->lock);
}

Expand Down

0 comments on commit 6d4a314

Please sign in to comment.