summaryrefslogtreecommitdiffstats
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorJan Kara2017-06-09 08:36:16 +0200
committerJan Kara2017-08-17 19:05:16 +0200
commitf14618c6823ee0f9f92a87aad7d5ad26916ccff1 (patch)
tree6cb1b9a685046e6bd0197952f8078d31c7b5f772 /fs/quota/dquot.c
parentquota: Push dqio_sem down to ->release_dqblk() (diff)
downloadkernel-qcow2-linux-f14618c6823ee0f9f92a87aad7d5ad26916ccff1.tar.gz
kernel-qcow2-linux-f14618c6823ee0f9f92a87aad7d5ad26916ccff1.tar.xz
kernel-qcow2-linux-f14618c6823ee0f9f92a87aad7d5ad26916ccff1.zip
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.c6
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);
int dquot_get_next_id(struct super_block *sb, struct kqid *qid)
{
struct quota_info *dqopt = sb_dqopt(sb);
- int err;
if (!sb_has_quota_active(sb, qid->type))
return -ESRCH;
if (!dqopt->ops[qid->type]->get_next_id)
return -ENOSYS;
- down_read(&dqopt->dqio_sem);
- err = dqopt->ops[qid->type]->get_next_id(sb, qid);
- up_read(&dqopt->dqio_sem);
- return err;
+ return dqopt->ops[qid->type]->get_next_id(sb, qid);
}
EXPORT_SYMBOL(dquot_get_next_id);