From: Jan Kara Date: Sat, 16 Apr 2005 22:25:46 +0000 (-0700) Subject: [PATCH] quota: fix possible oops on quotaoff X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31e7ad6ac919761f0486f7781b02ff3ab54b6ef1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/dquot.c b/fs/dquot.c index 11048e0b32c9..3995ce7907cc 100644 --- a/fs/dquot.c +++ b/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); 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);