* [PATCH] xfs: fix double IRELE in xfs_dqrele_inode
@ 2009-10-12 23:42 Christoph Hellwig
2009-10-13 1:27 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-10-12 23:42 UTC (permalink / raw)
To: xfs
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 <hch@lst.de>
Reported-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Index: xfs/fs/xfs/quota/xfs_qm_syscalls.c
===================================================================
--- xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2009-10-11 13:41:52.932012023 -0300
+++ xfs/fs/xfs/quota/xfs_qm_syscalls.c 2009-10-11 13:42:04.060016467 -0300
@@ -876,7 +876,6 @@ xfs_dqrele_inode(
ip->i_gdquot = NULL;
}
xfs_iput(ip, XFS_ILOCK_EXCL);
- IRELE(ip);
return 0;
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] xfs: fix double IRELE in xfs_dqrele_inode
2009-10-12 23:42 [PATCH] xfs: fix double IRELE in xfs_dqrele_inode Christoph Hellwig
@ 2009-10-13 1:27 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2009-10-13 1:27 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On , Christoph Hellwig wrote:
> 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.
Regression was caused by fe588ed32867b42e0d906db558ca92fd9f8b128e
Fix looks good. I'll push it to Linus tomorrow.
> Thanks to Utako Kusaka for reporting the bug and provinding a good testcase.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
> Index: xfs/fs/xfs/quota/xfs_qm_syscalls.c
> ===================================================================
> --- xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2009-10-11 13:41:52.932012023 -0300
> +++ xfs/fs/xfs/quota/xfs_qm_syscalls.c 2009-10-11 13:42:04.060016467 -0300
> @@ -876,7 +876,6 @@ xfs_dqrele_inode(
> ip->i_gdquot = NULL;
> }
> xfs_iput(ip, XFS_ILOCK_EXCL);
> - IRELE(ip);
>
> return 0;
> }
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-13 1:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-12 23:42 [PATCH] xfs: fix double IRELE in xfs_dqrele_inode Christoph Hellwig
2009-10-13 1:27 ` Alex Elder
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.