All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Riffard <laurent.riffard@free.fr>
To: "reiserfs-list@namesys.com" <reiserfs-list@namesys.com>
Subject: [PATCH 4/10] Reiser4: release d_ref
Date: Sun, 03 Dec 2006 14:50:36 +0100	[thread overview]
Message-ID: <4572D62C.9080103a@free.fr> (raw)
In-Reply-To: <4571D852.3080401@free.fr>

(From Andrew Wade <andrew.j.wade@gmail.com>)

Hello Alexander,

In addition to your patch, I've also applied the patch below. With
these two patches the fs is much more stable for me.

However, something is holding a d_ref across the calls to
reiser4_writepage. It's not clear to me that this is allowed so my
patch may not be a full fix.

Andrew Wade
---
fs/reiser4/plugin/item/extent_file_ops.c |   12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/fs/reiser4/plugin/item/extent_file_ops.c b/fs/reiser4/plugin/item/extent_file_ops.c
index af4c89e..7afbca3 100644
--- a/fs/reiser4/plugin/item/extent_file_ops.c
+++ b/fs/reiser4/plugin/item/extent_file_ops.c
@@ -1313,20 +1313,22 @@ static int extent_readpage_filler(void *data, struct page *page)
				      TWIG_LEVEL, CBK_UNIQUE, NULL);
		if (result != CBK_COORD_FOUND) {
			unset_hint(hint);
-			return result;
+			goto out;
		}
		ext_coord->valid = 0;
	}

	if (zload(ext_coord->coord.node)) {
		unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
	}
	if (!item_is_extent(&ext_coord->coord)) {
		/* tail conversion is running in parallel */
		zrelse(ext_coord->coord.node);
		unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
	}

	if (ext_coord->valid == 0)
@@ -1351,6 +1353,10 @@ static int extent_readpage_filler(void *data, struct page *page)
	} else
		unset_hint(hint);
	zrelse(ext_coord->coord.node);
+
+out:
+	/* Calls to this function may be intermingled with VM writeback. */
+	reiser4_txn_restart_current();
	return result;
}

-- 1.4.4.1.gaed4 






  parent reply	other threads:[~2006-12-03 13:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 13:49 Reiser4 for 2.6.19 Laurent Riffard
2006-12-03 13:49 ` [PATCH 1/10] Reiser4 for 2.6.18 version 3 Laurent Riffard
2006-12-03 13:50 ` [PATCH 2/10] Reiser4: cometics changes in mm/filemap.c Laurent Riffard
2006-12-03 13:50 ` [PATCH 3/10] Reiser4: fix use after free in jrelse_tail Laurent Riffard
2006-12-03 13:50 ` Laurent Riffard [this message]
2006-12-03 13:50 ` [PATCH 5/10] Reiser4: release d_ref (fix) Laurent Riffard
2006-12-03 13:50 ` [PATCH 6/10] Reiser4: fix calls to kmem_cache_destroy Laurent Riffard
2006-12-03 13:51 ` [PATCH 7/10] Reiser4: Replace inode.u.generic_ip with inode.i_private Laurent Riffard
2006-12-03 13:51 ` [PATCH 8/10] Reiser4: inode.i_blksize suppression Laurent Riffard
2006-12-03 13:51 ` [PATCH 9/10] Reiser4: remove unnecessary config.h includes Laurent Riffard
2006-12-03 13:51 ` [PATCH 10/10] reiser4-generic_file_read-fix Laurent Riffard
2006-12-04 10:53 ` Reiser4 for 2.6.19 Guilherme Covolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4572D62C.9080103a@free.fr \
    --to=laurent.riffard@free.fr \
    --cc=reiserfs-list@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.