summaryrefslogtreecommitdiffstats
path: root/fs/quota/quota_v1.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-06-09 08:45:43 +0200
committerJan Kara <jack@suse.cz>2017-08-17 19:11:23 +0200
commit9a8ae30e73cb8827dd0a8ae5fd505db457cfb7ed (patch)
treeebc569647ebbffa64b3cbfe81873a97aacb0c3f7 /fs/quota/quota_v1.c
parentf14618c6823ee0f9f92a87aad7d5ad26916ccff1 (diff)
downloadlinux-9a8ae30e73cb8827dd0a8ae5fd505db457cfb7ed.tar.bz2
quota: Push dqio_sem down to ->write_file_info()
Push down acquisition of dqio_sem into ->write_file_info() 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/quota_v1.c')
-rw-r--r--fs/quota/quota_v1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c
index 12d69cda57cc..fe68bf544b29 100644
--- a/fs/quota/quota_v1.c
+++ b/fs/quota/quota_v1.c
@@ -186,6 +186,7 @@ static int v1_write_file_info(struct super_block *sb, int type)
struct v1_disk_dqblk dqblk;
int ret;
+ down_write(&dqopt->dqio_sem);
dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
ret = sb->s_op->quota_read(sb, type, (char *)&dqblk,
sizeof(struct v1_disk_dqblk), v1_dqoff(0));
@@ -203,6 +204,7 @@ static int v1_write_file_info(struct super_block *sb, int type)
else if (ret > 0)
ret = -EIO;
out:
+ up_write(&dqopt->dqio_sem);
return ret;
}