浏览代码

[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>
Jan Kara 20 年之前
父节点
当前提交
31e7ad6ac9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/dquot.c

+ 1 - 0
fs/dquot.c

@@ -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);
 	oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);
 	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
 	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
 	up_write(&dqopt->dqptr_sem);
 	up_write(&dqopt->dqptr_sem);
+	sb->dq_op->drop(inode);
 
 
 	error = -EIO;
 	error = -EIO;
 	dqopt->files[type] = igrab(inode);
 	dqopt->files[type] = igrab(inode);