Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140083
b: refs/heads/master
c: b93b6e4
h: refs/heads/master
i:
  140081: 2cc0837
  140079: 99b7ed5
v: v3
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Feb 4, 2009
1 parent 1742a48 commit 1459bab
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9057e3da79d18fdbd9d6adbb183f032c614feeb
refs/heads/master: b93b6e434c046459cf3111c76dce46ba4abcb2b6
15 changes: 7 additions & 8 deletions trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ xfs_mountfs(
error = xfs_mount_log_sb(mp, mp->m_update_flags);
if (error) {
cmn_err(CE_WARN, "XFS: failed to write sb changes");
goto out_rele_rip;
goto out_rtunmount;
}
}

Expand All @@ -1147,7 +1147,7 @@ xfs_mountfs(
*/
error = XFS_QM_INIT(mp, &quotamount, &quotaflags);
if (error)
goto out_rele_rip;
goto out_rtunmount;

/*
* Finish recovering the file system. This part needed to be
Expand All @@ -1157,15 +1157,15 @@ xfs_mountfs(
error = xfs_log_mount_finish(mp);
if (error) {
cmn_err(CE_WARN, "XFS: log mount finish failed");
goto out_rele_rip;
goto out_rtunmount;
}

/*
* Complete the quota initialisation, post-log-replay component.
*/
error = XFS_QM_MOUNT(mp, quotamount, quotaflags);
if (error)
goto out_rele_rip;
goto out_rtunmount;

/*
* Now we are mounted, reserve a small amount of unused space for
Expand All @@ -1189,6 +1189,8 @@ xfs_mountfs(

return 0;

out_rtunmount:
xfs_rtunmount_inodes(mp);
out_rele_rip:
IRELE(rip);
out_log_dealloc:
Expand Down Expand Up @@ -1219,10 +1221,7 @@ xfs_unmountfs(
*/
XFS_QM_UNMOUNT(mp);

if (mp->m_rbmip)
IRELE(mp->m_rbmip);
if (mp->m_rsumip)
IRELE(mp->m_rsumip);
xfs_rtunmount_inodes(mp);
IRELE(mp->m_rootip);

/*
Expand Down
10 changes: 10 additions & 0 deletions trunk/fs/xfs/xfs_rtalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/xfs/xfs_rtalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ xfs_rtfree_extent(
int /* error */
xfs_rtmount_init(
struct xfs_mount *mp); /* file system mount structure */
void
xfs_rtunmount_inodes(
struct xfs_mount *mp);

/*
* Get the bitmap and summary inodes into the mount structure
Expand Down Expand Up @@ -146,6 +149,7 @@ xfs_growfs_rt(
# define xfs_growfs_rt(mp,in) (ENOSYS)
# define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
# define xfs_rtunmount_inodes(m)
#endif /* CONFIG_XFS_RT */

#endif /* __KERNEL__ */
Expand Down

0 comments on commit 1459bab

Please sign in to comment.