summaryrefslogtreecommitdiff
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-06-08 16:30:45 +0300
committerJan Kara <jack@suse.cz>2017-08-17 20:01:00 +0300
commite342e38df925973b86cd46d40bbe7f083414e2ad (patch)
treeace185b868c9439b20fc9febf997e29770d4dc37 /fs/quota/dquot.c
parent5e8cb9b6249de3ac036ef4cf4b7babc2f4b95d90 (diff)
downloadlinux-e342e38df925973b86cd46d40bbe7f083414e2ad.tar.xz
quota: Push dqio_sem down to ->read_dqblk()
Push down acquisition of dqio_sem into ->read_dqblk() callback. It will allow quota formats to decide whether they need it or not. Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r--fs/quota/dquot.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 8b52e852eba2..46046523abf0 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -403,11 +403,8 @@ int dquot_acquire(struct dquot *dquot)
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
mutex_lock(&dquot->dq_lock);
- if (!test_bit(DQ_READ_B, &dquot->dq_flags)) {
- down_read(&dqopt->dqio_sem);
+ if (!test_bit(DQ_READ_B, &dquot->dq_flags))
ret = dqopt->ops[dquot->dq_id.type]->read_dqblk(dquot);
- up_read(&dqopt->dqio_sem);
- }
if (ret < 0)
goto out_iolock;
/* Make sure flags update is visible after dquot has been filled */