Skip to content

Commit

Permalink
quota: Remove locking for reading from the old quota format
Browse files Browse the repository at this point in the history
The old quota format has fixed offset in quota file based on ID so
there's no locking needed against concurrent modifications of the file
(locking against concurrent IO on the same dquot is still provided by
dq_lock).

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Jan Kara committed Aug 17, 2017
1 parent e342e38 commit 47cdc11
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/quota/quota_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ static int v1_read_dqblk(struct dquot *dquot)
if (!dqopt->files[type])
return -EINVAL;

down_read(&dqopt->dqio_sem);
/* Set structure to 0s in case read fails/is after end of file */
memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk,
Expand All @@ -75,7 +74,6 @@ static int v1_read_dqblk(struct dquot *dquot)
dquot->dq_dqb.dqb_isoftlimit == 0)
set_bit(DQ_FAKE_B, &dquot->dq_flags);
dqstats_inc(DQST_READS);
up_read(&dqopt->dqio_sem);

return 0;
}
Expand Down

0 comments on commit 47cdc11

Please sign in to comment.