linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: fix problem of wrong jump after the error occured
@ 2010-02-11  8:06 Miao Xie
  2010-02-11 14:03 ` Chris Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Miao Xie @ 2010-02-11  8:06 UTC (permalink / raw)
  To: Chris Mason; +Cc: Linux Btrfs

btrfs_mkdir() must jump to the place of ending transaction after
btrfs_find_free_objectid() failed. Or this transaction can't end.

This patch fixes this problem.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 4deb280..4f230e4 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4501,7 +4501,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 	err = btrfs_find_free_objectid(trans, root, dir->i_ino, &objectid);
 	if (err) {
 		err = -ENOSPC;
-		goto out_unlock;
+		goto out_fail;
 	}
 
 	inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: fix problem of wrong jump after the error occured
  2010-02-11  8:06 [PATCH] btrfs: fix problem of wrong jump after the error occured Miao Xie
@ 2010-02-11 14:03 ` Chris Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2010-02-11 14:03 UTC (permalink / raw)
  To: Miao Xie; +Cc: Linux Btrfs

On Thu, Feb 11, 2010 at 04:06:58PM +0800, Miao Xie wrote:
> btrfs_mkdir() must jump to the place of ending transaction after
> btrfs_find_free_objectid() failed. Or this transaction can't end.
> 
> This patch fixes this problem.

Thanks, this patch is correct.

-chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-11 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11  8:06 [PATCH] btrfs: fix problem of wrong jump after the error occured Miao Xie
2010-02-11 14:03 ` Chris Mason

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