]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[PATCH] quota: fix possible oops on quotaoff
authorJan Kara <jack@suse.cz>
Sat, 16 Apr 2005 22:25:46 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:25:46 +0000 (15:25 -0700)
Remove dquot structures from quota file on quotaon - quota code does not
expect them to be there.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/dquot.c

index 11048e0b32c92f3ebe8ec983c9ae118de5606921..3995ce7907ccbcfb276fa694cfa4bc98ddd8cc69 100644 (file)
@@ -1443,6 +1443,7 @@ static int vfs_quota_on_inode(struct inode *inode, int type, int format_id)
        oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);
        inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
        up_write(&dqopt->dqptr_sem);
+       sb->dq_op->drop(inode);
 
        error = -EIO;
        dqopt->files[type] = igrab(inode);