Commit 96fa2f0a authored by Jan Kara's avatar Jan Kara Committed by Greg Kroah-Hartman

[PATCH] Fix old quota format locking

This fixes a bug in locking (we take one lock twice) for old quota
format.  Without this patch the old format simply don't work (I really
don't know how that could happen).

Thanks go to Herbert Potzl who spotted it.
parent 0ea22499
......@@ -164,7 +164,6 @@ static int v1_read_file_info(struct super_block *sb, int type)
struct v1_disk_dqblk dqblk;
int ret;
down(&dqopt->dqio_sem);
offset = v1_dqoff(0);
fs = get_fs();
set_fs(KERNEL_DS);
......@@ -177,7 +176,6 @@ static int v1_read_file_info(struct super_block *sb, int type)
dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
out:
up(&dqopt->dqio_sem);
set_fs(fs);
return ret;
}
......@@ -191,7 +189,6 @@ static int v1_write_file_info(struct super_block *sb, int type)
loff_t offset;
int ret;
down(&dqopt->dqio_sem);
dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
offset = v1_dqoff(0);
fs = get_fs();
......@@ -210,7 +207,6 @@ static int v1_write_file_info(struct super_block *sb, int type)
else if (ret > 0)
ret = -EIO;
out:
up(&dqopt->dqio_sem);
set_fs(fs);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment