All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure
Date: Tue, 30 Jul 2013 10:14:44 -0400 (EDT)	[thread overview]
Message-ID: <1521672306.1289505.1375193684707.JavaMail.root@redhat.com> (raw)
In-Reply-To: <103608963.1288829.1375193618752.JavaMail.root@redhat.com>

Hi,

This patch adds one line of code that deletes a block reservation
structure for the source directory in the event that the inode creation
operation fails. If the inode creation succeeds, the reservation will
be deleted anyway, since directory reservations are now only 1 block.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
---
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index a01b8fd..371e4e3 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -715,6 +715,7 @@ fail_free_inode:
 	free_inode_nonrcu(inode);
 	inode = NULL;
 fail_gunlock:
+	gfs2_rs_delete(dip);
 	gfs2_glock_dq_uninit(ghs);
 	if (inode && !IS_ERR(inode)) {
 		clear_nlink(inode);



       reply	other threads:[~2013-07-30 14:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <103608963.1288829.1375193618752.JavaMail.root@redhat.com>
2013-07-30 14:14 ` Bob Peterson [this message]
2013-07-30 14:18   ` [Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure Steven Whitehouse
2013-07-30 15:42     ` Bob Peterson
2013-07-30 15:53       ` Steven Whitehouse

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=1521672306.1289505.1375193684707.JavaMail.root@redhat.com \
    --to=rpeterso@redhat.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.