* [PATCH] fs/ceph/addr.c: Convert to use vmf_error()
@ 2019-01-04 19:30 Souptick Joarder
2019-01-05 10:58 ` Ilya Dryomov
0 siblings, 1 reply; 2+ messages in thread
From: Souptick Joarder @ 2019-01-04 19:30 UTC (permalink / raw)
To: zyan, sage, idryomov; +Cc: ceph-devel, linux-kernel, willy
This code is converted to use vmf_error().
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
fs/ceph/addr.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 8eade7a..fa2a85d 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1495,10 +1495,7 @@ static vm_fault_t ceph_filemap_fault(struct vm_fault *vmf)
if (err < 0 || off >= i_size_read(inode)) {
unlock_page(page);
put_page(page);
- if (err == -ENOMEM)
- ret = VM_FAULT_OOM;
- else
- ret = VM_FAULT_SIGBUS;
+ ret = vmf_error(err);
goto out_inline;
}
if (err < PAGE_SIZE)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/ceph/addr.c: Convert to use vmf_error()
2019-01-04 19:30 [PATCH] fs/ceph/addr.c: Convert to use vmf_error() Souptick Joarder
@ 2019-01-05 10:58 ` Ilya Dryomov
0 siblings, 0 replies; 2+ messages in thread
From: Ilya Dryomov @ 2019-01-05 10:58 UTC (permalink / raw)
To: Souptick Joarder
Cc: Yan, Zheng, Sage Weil, Ceph Development, linux-kernel, willy
On Fri, Jan 4, 2019 at 8:26 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> This code is converted to use vmf_error().
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> fs/ceph/addr.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 8eade7a..fa2a85d 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -1495,10 +1495,7 @@ static vm_fault_t ceph_filemap_fault(struct vm_fault *vmf)
> if (err < 0 || off >= i_size_read(inode)) {
> unlock_page(page);
> put_page(page);
> - if (err == -ENOMEM)
> - ret = VM_FAULT_OOM;
> - else
> - ret = VM_FAULT_SIGBUS;
> + ret = vmf_error(err);
> goto out_inline;
> }
> if (err < PAGE_SIZE)
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-05 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 19:30 [PATCH] fs/ceph/addr.c: Convert to use vmf_error() Souptick Joarder
2019-01-05 10:58 ` Ilya Dryomov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).