diff options
author | Dave Chinner <david@fromorbit.com> | 2015-02-24 10:24:07 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-02-24 10:24:07 +1100 |
commit | 3cabb836d801c3ad791c2dc6be07ec5819ab0a37 (patch) | |
tree | dbc5bff557d23e978fd3c8920c7d99d8c09fa272 /fs/xfs/xfs_qm.c | |
parent | 83d5f01858b56db69c8e4ca5389ef7c29bfdb5dd (diff) | |
parent | 444a702231412e82fb1c09679adc159301e9242c (diff) | |
download | talos-obmc-linux-3cabb836d801c3ad791c2dc6be07ec5819ab0a37.tar.gz talos-obmc-linux-3cabb836d801c3ad791c2dc6be07ec5819ab0a37.zip |
Merge branch 'xfs-misc-fixes-for-4.1' into for-next
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r-- | fs/xfs/xfs_qm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index fbbb9e62e274..5538468c7f63 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -719,6 +719,7 @@ xfs_qm_qino_alloc( xfs_trans_t *tp; int error; int committed; + bool need_alloc = true; *ip = NULL; /* @@ -747,6 +748,7 @@ xfs_qm_qino_alloc( return error; mp->m_sb.sb_gquotino = NULLFSINO; mp->m_sb.sb_pquotino = NULLFSINO; + need_alloc = false; } } @@ -758,7 +760,7 @@ xfs_qm_qino_alloc( return error; } - if (!*ip) { + if (need_alloc) { error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, 0, 1, ip, &committed); if (error) { @@ -794,11 +796,14 @@ xfs_qm_qino_alloc( spin_unlock(&mp->m_sb_lock); xfs_log_sb(tp); - if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES))) { + error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); + if (error) { + ASSERT(XFS_FORCED_SHUTDOWN(mp)); xfs_alert(mp, "%s failed (error %d)!", __func__, error); - return error; } - return 0; + if (need_alloc) + xfs_finish_inode_setup(*ip); + return error; } |