diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 8 | ||||
-rw-r--r-- | fs/ceph/file.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 452e71a1b753..4469b63c9b7b 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -308,8 +308,8 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) | |||
308 | NULL, 0, | 308 | NULL, 0, |
309 | ci->i_truncate_seq, ci->i_truncate_size, | 309 | ci->i_truncate_seq, ci->i_truncate_size, |
310 | NULL, false, 1, 0); | 310 | NULL, false, 1, 0); |
311 | if (!req) | 311 | if (IS_ERR(req)) |
312 | return -ENOMEM; | 312 | return PTR_ERR(req); |
313 | 313 | ||
314 | /* build page vector */ | 314 | /* build page vector */ |
315 | nr_pages = len >> PAGE_CACHE_SHIFT; | 315 | nr_pages = len >> PAGE_CACHE_SHIFT; |
@@ -832,8 +832,8 @@ get_more_pages: | |||
832 | ci->i_truncate_size, | 832 | ci->i_truncate_size, |
833 | &inode->i_mtime, true, 1, 0); | 833 | &inode->i_mtime, true, 1, 0); |
834 | 834 | ||
835 | if (!req) { | 835 | if (IS_ERR(req)) { |
836 | rc = -ENOMEM; | 836 | rc = PTR_ERR(req); |
837 | unlock_page(page); | 837 | unlock_page(page); |
838 | break; | 838 | break; |
839 | } | 839 | } |
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: | |||
536 | do_sync, | 536 | do_sync, |
537 | ci->i_truncate_seq, ci->i_truncate_size, | 537 | ci->i_truncate_seq, ci->i_truncate_size, |
538 | &mtime, false, 2, page_align); | 538 | &mtime, false, 2, page_align); |
539 | if (!req) | 539 | if (IS_ERR(req)) |
540 | return -ENOMEM; | 540 | return PTR_ERR(req); |
541 | 541 | ||
542 | if (file->f_flags & O_DIRECT) { | 542 | if (file->f_flags & O_DIRECT) { |
543 | pages = ceph_get_direct_page_vector(data, num_pages, false); | 543 | pages = ceph_get_direct_page_vector(data, num_pages, false); |