From: Jan Kara <jack@suse.cz>
To: Dmitry <dmonakhov@openvz.org>
Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] quota: fix dquot_disable vs dquot_trasnfer race v2
Date: Mon, 11 Oct 2010 15:33:31 +0200 [thread overview]
Message-ID: <20101011133328.GA3830@quack.suse.cz> (raw)
In-Reply-To: <87eibznpnx.fsf@dmon-lap.sw.ru>
On Sat 09-10-10 23:15:30, Dmitry wrote:
>
> I've got following lockup:
> dquot_disable dquot_transfer
> ->dqget()
> sb_has_quota_active
> dqopt->flags &= ~dquot_state_flag(f, cnt) atomic_inc(dq->dq_count)
> ->drop_dquot_ref(sb, cnt);
> down_write(dqptr_sem)
> inode->i_dquot[cnt] = NULL ->__dquot_transfer
> invalidate_dquots(sb, cnt); down_write(&dqptr_sem)
> ->wait for dq_wait_unused inode->i_dquot = new_dquot
> /* wait forever */ ^^^^New quota user^^^^^^
>
> Inodes was already cleaned from quotas, and we can not allow new ones.
> We have to recheck quota state under dqptr_sem and before assignment,
> as we do it in dquot_initialize()
Thanks. Merged into my tree.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2010-10-11 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 15:24 [PATCH] quota: fix dquot_disable vs dquot_trasnfer race Dmitry Monakhov
2010-10-09 19:01 ` Dmitry
2010-10-09 19:15 ` [PATCH] quota: fix dquot_disable vs dquot_trasnfer race v2 Dmitry
2010-10-11 13:33 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101011133328.GA3830@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).