diff options
author | Jan Kara <jack@suse.cz> | 2017-06-09 02:36:16 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-08-17 13:05:16 -0400 |
commit | f14618c6823ee0f9f92a87aad7d5ad26916ccff1 (patch) | |
tree | 6cb1b9a685046e6bd0197952f8078d31c7b5f772 /fs/quota/dquot.c | |
parent | b9a1a7f4b6b5861c6ae89a125271103ceb8c8690 (diff) |
quota: Push dqio_sem down to ->get_next_id()
Push down acquisition of dqio_sem into ->get_next_id() callback. Mostly
for consistency with other operations.
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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 3b3c7f094ff8..332f7026edad 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -2067,16 +2067,12 @@ EXPORT_SYMBOL(dquot_commit_info); | |||
2067 | int dquot_get_next_id(struct super_block *sb, struct kqid *qid) | 2067 | int dquot_get_next_id(struct super_block *sb, struct kqid *qid) |
2068 | { | 2068 | { |
2069 | struct quota_info *dqopt = sb_dqopt(sb); | 2069 | struct quota_info *dqopt = sb_dqopt(sb); |
2070 | int err; | ||
2071 | 2070 | ||
2072 | if (!sb_has_quota_active(sb, qid->type)) | 2071 | if (!sb_has_quota_active(sb, qid->type)) |
2073 | return -ESRCH; | 2072 | return -ESRCH; |
2074 | if (!dqopt->ops[qid->type]->get_next_id) | 2073 | if (!dqopt->ops[qid->type]->get_next_id) |
2075 | return -ENOSYS; | 2074 | return -ENOSYS; |
2076 | down_read(&dqopt->dqio_sem); | 2075 | return dqopt->ops[qid->type]->get_next_id(sb, qid); |
2077 | err = dqopt->ops[qid->type]->get_next_id(sb, qid); | ||
2078 | up_read(&dqopt->dqio_sem); | ||
2079 | return err; | ||
2080 | } | 2076 | } |
2081 | EXPORT_SYMBOL(dquot_get_next_id); | 2077 | EXPORT_SYMBOL(dquot_get_next_id); |
2082 | 2078 | ||