Ext2 quota bug in 2.4.8

From: Jan Kara (jack@suse.cz)
Date: Wed Aug 22 2001 - 03:44:24 EST


  Hello,

  Jan Sanislo <oystr@cs.washington.edu> found a bug in ext2 quota code in 2.4.6+.
During changes in ext2 code in 2.4.6 some DQUOT_INIT()s were removed but they
shouldn't and as a result quota is not computed right.
  The patch which adds missing DQUOT_INIT()s is below. I didn't place DQUOT_INIT()s to
original places but rather to generic vfs parts which seems better to me.
  Please apply - patch is against 2.4.8.

                                                                Honza

--
Jan Kara <jack@suse.cz>
SuSE Labs

-------------------------------------------------------------------------

--- linux-2.4.8/fs/namei.c Tue Aug 21 20:43:31 2001 +++ linux-2.4.8/fs/namei.c Tue Aug 21 20:44:08 2001 @@ -1330,6 +1330,7 @@ return -EPERM; DQUOT_INIT(dir); + DQUOT_INIT(dentry->d_inode); double_down(&dir->i_zombie, &dentry->d_inode->i_zombie); d_unhash(dentry); @@ -1405,10 +1406,11 @@ if (!error) { error = -EPERM; if (dir->i_op && dir->i_op->unlink) { - DQUOT_INIT(dir); if (d_mountpoint(dentry)) error = -EBUSY; else { + DQUOT_INIT(dir); + DQUOT_INIT(dentry->d_inode); lock_kernel(); error = dir->i_op->unlink(dir, dentry); unlock_kernel(); - 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 23 2001 - 21:00:47 EST