quota: Protect dquot writeout with dq_lock
authorJan Kara <jack@suse.cz>
Thu, 8 Jun 2017 13:16:41 +0000 (15:16 +0200)
committerJan Kara <jack@suse.cz>
Thu, 17 Aug 2017 17:00:50 +0000 (19:00 +0200)
commit5e8cb9b6249de3ac036ef4cf4b7babc2f4b95d90
treed1c594afe05bb850be832c423934486324939994
parentd6ab3661020cbf8a8909b49a8e1408d5ae434001
quota: Protect dquot writeout with dq_lock

Currently dquot writeout is only protected by dqio_sem held for writing.
As we transition to a finer grained locking we will use dquot->dq_lock
instead. So acquire it in dquot_commit() and move dqio_sem just around
->commit_dqblk() call as it is still needed to serialize quota file
changes.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c