linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).