From 50e0f7f106d53bf02ea97c57cddfb2a81120b03d Mon Sep 17 00:00:00 2001 From: David Chinner Date: Thu, 30 Oct 2008 17:07:20 +1100 Subject: [PATCH] --- yaml --- r: 124818 b: refs/heads/master c: 2f8a3ce1c20f20e6494cdb77fed76bc474ca3ca5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/quota/xfs_dquot.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 7294ccf4b31f..65b1925aa17a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75c68f411b1242c8fdaf731078fdd4e77b14981d +refs/heads/master: 2f8a3ce1c20f20e6494cdb77fed76bc474ca3ca5 diff --git a/trunk/fs/xfs/quota/xfs_dquot.c b/trunk/fs/xfs/quota/xfs_dquot.c index d3f4fbbe2480..1e6bf3925645 100644 --- a/trunk/fs/xfs/quota/xfs_dquot.c +++ b/trunk/fs/xfs/quota/xfs_dquot.c @@ -1221,16 +1221,14 @@ xfs_qm_dqflush( xfs_dqtrace_entry(dqp, "DQFLUSH"); /* - * If not dirty, nada. + * If not dirty, or it's pinned and we are not supposed to + * block, nada. */ - if (!XFS_DQ_IS_DIRTY(dqp)) { + if (!XFS_DQ_IS_DIRTY(dqp) || + (!(flags & XFS_QMOPT_SYNC) && atomic_read(&dqp->q_pincount) > 0)) { xfs_dqfunlock(dqp); - return (0); + return 0; } - - /* - * Cant flush a pinned dquot. Wait for it. - */ xfs_qm_dqunpin_wait(dqp); /*