diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-14 14:54:53 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-19 16:53:08 -0400 |
commit | dbae4c73f08b8a7980cc912954ade3d4c1fb6147 (patch) | |
tree | 8a1ddd0b9df5ae7e919a235e9c765266d68a0e3f /fs/nfs/direct.c | |
parent | c9d8f89d9816c1d16ada492aa547a4d692508c0d (diff) |
NFS: Ensure that rpc_run_task() errors are propagated back to the caller
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r-- | fs/nfs/direct.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index abf8e0286e35..4757a2b326a1 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -347,8 +347,9 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq, | |||
347 | NFS_PROTO(inode)->read_setup(data, &msg); | 347 | NFS_PROTO(inode)->read_setup(data, &msg); |
348 | 348 | ||
349 | task = rpc_run_task(&task_setup_data); | 349 | task = rpc_run_task(&task_setup_data); |
350 | if (!IS_ERR(task)) | 350 | if (IS_ERR(task)) |
351 | rpc_put_task(task); | 351 | break; |
352 | rpc_put_task(task); | ||
352 | 353 | ||
353 | dprintk("NFS: %5u initiated direct read call " | 354 | dprintk("NFS: %5u initiated direct read call " |
354 | "(req %s/%Ld, %zu bytes @ offset %Lu)\n", | 355 | "(req %s/%Ld, %zu bytes @ offset %Lu)\n", |
@@ -763,8 +764,9 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq, | |||
763 | NFS_PROTO(inode)->write_setup(data, &msg); | 764 | NFS_PROTO(inode)->write_setup(data, &msg); |
764 | 765 | ||
765 | task = rpc_run_task(&task_setup_data); | 766 | task = rpc_run_task(&task_setup_data); |
766 | if (!IS_ERR(task)) | 767 | if (IS_ERR(task)) |
767 | rpc_put_task(task); | 768 | break; |
769 | rpc_put_task(task); | ||
768 | 770 | ||
769 | dprintk("NFS: %5u initiated direct write call " | 771 | dprintk("NFS: %5u initiated direct write call " |
770 | "(req %s/%Ld, %zu bytes @ offset %Lu)\n", | 772 | "(req %s/%Ld, %zu bytes @ offset %Lu)\n", |