]> Pileus Git - ~andy/linux/blobdiff - fs/xfs/xfs_utils.c
[XFS] Fix double free of log tickets
[~andy/linux] / fs / xfs / xfs_utils.c
index 35d4d414bcc273ca0981fad6ed4dddbbf8a9ea42..771144932ab42ef08b21e68d1d7bc3c3db5d29df 100644 (file)
@@ -172,6 +172,12 @@ xfs_dir_ialloc(
                        *ipp = NULL;
                        return code;
                }
+
+               /*
+                * transaction commit worked ok so we can drop the extra ticket
+                * reference that we gained in xfs_trans_dup()
+                */
+               xfs_log_ticket_put(tp->t_ticket);
                code = xfs_trans_reserve(tp, 0, log_res, 0,
                                         XFS_TRANS_PERM_LOG_RES, log_count);
                /*