[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]