Skip to content

Commit

Permalink
xfs: fix double IRELE in xfs_dqrele_inode
Browse files Browse the repository at this point in the history
xfs_dqrele_inode calls xfs_iput to release the ilock and a reference
and then also calls IRELE which does a second decrement of the reference
count.  This leads to a premature freeing of inodes when quotas were turned
off while the filesystem was mounted.

Thanks to Utako Kusaka for reporting the bug and provinding a good testcase.

Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Utako Kusaka <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Alex Elder <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 13, 2009
1 parent d080070 commit 05277c7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/xfs/quota/xfs_qm_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@ xfs_dqrele_inode(
ip->i_gdquot = NULL;
}
xfs_iput(ip, XFS_ILOCK_EXCL);
IRELE(ip);

return 0;
}
Expand Down

0 comments on commit 05277c7

Please sign in to comment.