linux24/fs/jfs

OSS-jfs_Admin <[email protected]>
Newsgroups gmane.comp.file-systems.jfs.cvs
Message-ID <[email protected]>
Update of /usr/cvs/jfs/linux24/fs/jfs
In directory swg3ws024:/tmp/cvs-serv8815

Modified Files:
	jfs_txnmgr.c 
Log Message:
Releasing LOGGC_LOCK too early

In txLazyCommit, we are releasing log->gclock (LOGGC_LOCK) before
checking tblk->flag for tblkGC_LAZY.  For the case that tblkGC_LAZY
is not set, the user thread may release the tblk, and it may be
reused and the tblkGC_LAZY bit set again, between the time we release
the spinlock until we check the flag.  This problem is easy to hit
on a 2.5 kernel with CONFIG_PREEMPT set, but it is a potential problem
on SMP as well.

The fix is to hold the spinlock until after we've checked the flag.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.