diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2014-07-10 11:50:39 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-08-02 01:23:04 -0500 |
commit | fb8a3e52559ad52829c6838d304f5b75c140b97a (patch) | |
tree | c483c138c1a0f299a35c9b02e8b6c8b4f5c92dd1 /fs/cifs | |
parent | 2e8a05d80213cdfbf3bf8e6eb3059831c7015e89 (diff) | |
download | linux-fb8a3e52559ad52829c6838d304f5b75c140b97a.tar.bz2 |
CIFS: Improve indentation in cifs_user_read()
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index c3390e2c6e0d..e17012817d9d 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3027,28 +3027,27 @@ again: rc = wait_for_completion_killable(&rdata->done); if (rc) rc = -EINTR; - else if (rdata->result) { - rc = rdata->result; + else if (rdata->result == -EAGAIN) { /* resend call if it's a retryable error */ - if (rc == -EAGAIN) { - struct list_head tmp_list; + struct list_head tmp_list; - list_del_init(&rdata->list); - INIT_LIST_HEAD(&tmp_list); + list_del_init(&rdata->list); + INIT_LIST_HEAD(&tmp_list); - rc = cifs_send_async_read(rdata->offset, + rc = cifs_send_async_read(rdata->offset, rdata->bytes, rdata->cfile, cifs_sb, &tmp_list); - list_splice(&tmp_list, &rdata_list); + list_splice(&tmp_list, &rdata_list); - kref_put(&rdata->refcount, - cifs_uncached_readdata_release); - goto again; - } - } else { + kref_put(&rdata->refcount, + cifs_uncached_readdata_release); + goto again; + } else if (rdata->result) + rc = rdata->result; + else rc = cifs_readdata_to_iov(rdata, to); - } + /* if there was a short read -- discard anything left */ if (rdata->got_bytes && rdata->got_bytes < rdata->bytes) rc = -ENODATA; |