From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Tue, 30 Jul 2013 10:14:44 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure In-Reply-To: <103608963.1288829.1375193618752.JavaMail.root@redhat.com> Message-ID: <1521672306.1289505.1375193684707.JavaMail.root@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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);