* [PATCH] exofs: fix hang on error path
@ 2012-11-25 17:44 Idan Kedar
2012-11-26 14:47 ` Idan Kedar
0 siblings, 1 reply; 2+ messages in thread
From: Idan Kedar @ 2012-11-25 17:44 UTC (permalink / raw)
To: bharrosh; +Cc: idank, linux-fsdevel, osd-dev, solo, bhalevy, ilya
if ore_write() fails, we would unlock the pages of pcol, which is now
empty, rather than pcol_copy which owns the pages when ore_write() is
called. this means that no pages will actually be unlocked
(pcol.nr_pages == 0) and the writing process (more accurately, the
syncing process) will hang waiting for a writeback notification that
never comes.
Signed-off-by: Idan Kedar <idank@tonian.com>
---
fs/exofs/inode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index b561810..bc5f1fe 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -676,7 +676,7 @@ static int write_exec(struct page_collect *pcol)
return 0;
err:
- _unlock_pcol_pages(pcol, ret, WRITE);
+ _unlock_pcol_pages(pcol->pages ? pcol : pcol_copy, ret, WRITE);
pcol_free(pcol);
kfree(pcol_copy);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] exofs: fix hang on error path
2012-11-25 17:44 [PATCH] exofs: fix hang on error path Idan Kedar
@ 2012-11-26 14:47 ` Idan Kedar
0 siblings, 0 replies; 2+ messages in thread
From: Idan Kedar @ 2012-11-26 14:47 UTC (permalink / raw)
To: Boaz Harrosh
Cc: osd-dev, Lev Solomonov, Benny Halevy, Ilya Usvyatsky,
Linux FS Maling List
On Sun, Nov 25, 2012 at 7:44 PM, Idan Kedar <idank@tonian.com> wrote:
> if ore_write() fails, we would unlock the pages of pcol, which is now
> empty, rather than pcol_copy which owns the pages when ore_write() is
> called. this means that no pages will actually be unlocked
> (pcol.nr_pages == 0) and the writing process (more accurately, the
> syncing process) will hang waiting for a writeback notification that
> never comes.
>
> Signed-off-by: Idan Kedar <idank@tonian.com>
> ---
> fs/exofs/inode.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
> index b561810..bc5f1fe 100644
> --- a/fs/exofs/inode.c
> +++ b/fs/exofs/inode.c
> @@ -676,7 +676,7 @@ static int write_exec(struct page_collect *pcol)
> return 0;
>
> err:
> - _unlock_pcol_pages(pcol, ret, WRITE);
> + _unlock_pcol_pages(pcol->pages ? pcol : pcol_copy, ret, WRITE);
> pcol_free(pcol);
come think of it, pcol_free(pcol) will leak the ore_io_state here, i'm
sending a new patch to fix that as well.
> kfree(pcol_copy);
>
> --
> 1.7.6.5
>
--
idank
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-26 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-25 17:44 [PATCH] exofs: fix hang on error path Idan Kedar
2012-11-26 14:47 ` Idan Kedar
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).