[PATCH] quota: fix possible oops on quotaoff
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>
diff --git a/fs/dquot.c b/fs/dquot.c
index 11048e0..3995ce7 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1443,6 +1443,7 @@
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);