diff options
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r-- | fs/nfs/direct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 32fe97211eea..afcab007a22b 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -549,13 +549,13 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata) | |||
549 | 549 | ||
550 | spin_lock(&dreq->lock); | 550 | spin_lock(&dreq->lock); |
551 | 551 | ||
552 | if (unlikely(dreq->error != 0)) | ||
553 | goto out_unlock; | ||
554 | if (unlikely(status < 0)) { | 552 | if (unlikely(status < 0)) { |
555 | /* An error has occured, so we should not commit */ | 553 | /* An error has occurred, so we should not commit */ |
556 | dreq->flags = 0; | 554 | dreq->flags = 0; |
557 | dreq->error = status; | 555 | dreq->error = status; |
558 | } | 556 | } |
557 | if (unlikely(dreq->error != 0)) | ||
558 | goto out_unlock; | ||
559 | 559 | ||
560 | dreq->count += data->res.count; | 560 | dreq->count += data->res.count; |
561 | 561 | ||