]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/xfs/xfs_rtalloc.c
xfs: make sure to free the real-time inodes in the mount error path
[mirror_ubuntu-zesty-kernel.git] / fs / xfs / xfs_rtalloc.c
index edf12c7b834c04abd2ad11a3be4cd374940d920a..385f6dceba5db357a8bf7361fc24adde3e1185a2 100644 (file)
@@ -120,7 +120,7 @@ xfs_growfs_rt_alloc(
                if ((error = xfs_trans_iget(mp, tp, ino, 0,
                                                XFS_ILOCK_EXCL, &ip)))
                        goto error_cancel;
-               XFS_BMAP_INIT(&flist, &firstblock);
+               xfs_bmap_init(&flist, &firstblock);
                /*
                 * Allocate blocks to the bitmap file.
                 */
@@ -2288,6 +2288,16 @@ xfs_rtmount_inodes(
        return 0;
 }
 
+void
+xfs_rtunmount_inodes(
+       struct xfs_mount        *mp)
+{
+       if (mp->m_rbmip)
+               IRELE(mp->m_rbmip);
+       if (mp->m_rsumip)
+               IRELE(mp->m_rsumip);
+}
+
 /*
  * Pick an extent for allocation at the start of a new realtime file.
  * Use the sequence number stored in the atime field of the bitmap inode.