summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-09-24 21:01:02 -0700
committerAlex Elder <elder@inktank.com>2012-10-01 17:20:00 -0500
commit6816282dab3a72efe8c0d182c1bc2960d87f4322 (patch)
treec36cea753185ad22b073d41a1e5e5dbe56a928a1 /fs/ceph/file.c
parentd63b77f4c552cc3a20506871046ab0fcbc332609 (diff)
downloadlinux-6816282dab3a72efe8c0d182c1bc2960d87f4322.tar.gz
linux-6816282dab3a72efe8c0d182c1bc2960d87f4322.tar.bz2
linux-6816282dab3a72efe8c0d182c1bc2960d87f4322.zip
ceph: propagate layout error on osd request creation
If we are creating an osd request and get an invalid layout, return an EINVAL to the caller. We switch up the return to have an error code instead of NULL implying -ENOMEM. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index ecebbc09bfc7..5840d2aaed15 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -536,8 +536,8 @@ more:
do_sync,
ci->i_truncate_seq, ci->i_truncate_size,
&mtime, false, 2, page_align);
- if (!req)
- return -ENOMEM;
+ if (IS_ERR(req))
+ return PTR_ERR(req);
if (file->f_flags & O_DIRECT) {
pages = ceph_get_direct_page_vector(data, num_pages, false);