lkml.org 
[lkml]   [2005]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix possible oops on quotaoff
  Hi!

Attached one-liner should fix possible Oops on quotaoff - the code
does not expect quotafiles to have any dquots initialized but they
actually could have some in the following scenario:
turn on one quota type
write to the file with the other quota type (quota gets initialize)
turn on the other quota type

Please apply the fix (it should apply well to any recent kernel)

Honza

--
Jan Kara <jack@suse.cz>
SuSE CR Labs
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>

diff -rupX /home/jack/.kerndiffexclude linux-2.6.11/fs/dquot.c linux-2.6.11-dropfix/fs/dquot.c
--- linux-2.6.11/fs/dquot.c 2005-03-30 13:37:05.000000000 +0200
+++ linux-2.6.11-dropfix/fs/dquot.c 2005-03-31 14:03:45.000000000 +0200
@@ -1444,6 +1444,7 @@ static int vfs_quota_on_inode(struct ino
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);
\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.043 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site