summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-02-24 10:24:07 +1100
committerDave Chinner <david@fromorbit.com>2015-02-24 10:24:07 +1100
commit3cabb836d801c3ad791c2dc6be07ec5819ab0a37 (patch)
treedbc5bff557d23e978fd3c8920c7d99d8c09fa272 /fs/xfs/xfs_qm.c
parent83d5f01858b56db69c8e4ca5389ef7c29bfdb5dd (diff)
parent444a702231412e82fb1c09679adc159301e9242c (diff)
downloadop-kernel-dev-3cabb836d801c3ad791c2dc6be07ec5819ab0a37.zip
op-kernel-dev-3cabb836d801c3ad791c2dc6be07ec5819ab0a37.tar.gz
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.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index fbbb9e6..5538468 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;
}
OpenPOWER on IntegriCloud