[PATCH] Fix 2.6.0-test2 quota

From: Jan Kara (jack@ucw.cz)
Date: Fri Aug 01 2003 - 15:31:24 EST


  Hi Linus,

  I'm sending you a patch which 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). My thanks go to
Herbert Potzl who spotted it. The patch is attached, please apply.

                                                        Thanks
                                                                Honza

diff -ruNX /home/jack/.kerndiffexclude linux-2.6.0-test2/fs/quota_v1.c linux-2.6.0-test2-quotafix/fs/quota_v1.c
--- linux-2.6.0-test2/fs/quota_v1.c Sun Jul 27 19:06:18 2003
+++ linux-2.6.0-test2-quotafix/fs/quota_v1.c Tue Jul 29 21:19:39 2003
@@ -164,7 +164,6 @@
         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 @@
         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 @@
         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 @@
         else if (ret > 0)
                 ret = -EIO;
 out:
- up(&dqopt->dqio_sem);
         set_fs(fs);
         return ret;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 07 2003 - 22:00:17 EST