* Ext2 quota bug in 2.4.8
@ 2001-08-22 8:44 Jan Kara
2001-08-22 9:21 ` Alexander Viro
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2001-08-22 8:44 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, viro
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();
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ext2 quota bug in 2.4.8
2001-08-22 8:44 Ext2 quota bug in 2.4.8 Jan Kara
@ 2001-08-22 9:21 ` Alexander Viro
2001-08-22 15:04 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Viro @ 2001-08-22 9:21 UTC (permalink / raw)
To: Jan Kara; +Cc: torvalds, linux-kernel
On Wed, 22 Aug 2001, Jan Kara wrote:
> 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.
Wrong place - DQUOT_INIT should be in iput(), just before the call of
->delete_inode()
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ext2 quota bug in 2.4.8
2001-08-22 9:21 ` Alexander Viro
@ 2001-08-22 15:04 ` Jan Kara
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2001-08-22 15:04 UTC (permalink / raw)
To: Alexander Viro; +Cc: torvalds, linux-kernel
Hello,
> On Wed, 22 Aug 2001, Jan Kara wrote:
>
> > 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.
>
> Wrong place - DQUOT_INIT should be in iput(), just before the call of
> ->delete_inode()
OK. I was also thinking about this place but finally I chose those places in namei.c..
bad choice :)
The patch which places DQUOT_INIT() in iput() is below. Please apply.
Honza
--
Jan Kara <jack@suse.cz>
SuSE Labs
------------------------------------------------------------------------------------
--- linux-2.4.9/fs/inode.c Wed Aug 22 17:00:51 2001
+++ linux-2.4.9/fs/inode.c Wed Aug 22 17:01:11 2001
@@ -1049,6 +1049,7 @@
if (op && op->delete_inode) {
void (*delete)(struct inode *) = op->delete_inode;
+ DQUOT_INIT(inode);
/* s_op->delete_inode internally recalls clear_inode() */
delete(inode);
} else
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-08-22 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-22 8:44 Ext2 quota bug in 2.4.8 Jan Kara
2001-08-22 9:21 ` Alexander Viro
2001-08-22 15:04 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).