diff options
author | Joern Engel <joern@wohnheim.fh-wedel.de> | 2007-10-17 02:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:02 -0400 |
commit | 1c0eeaf5698597146ed9b873e2f9e0961edcf0f9 (patch) | |
tree | 5265eac8437e8ce517a62db8fe2bd99db5b7019b /fs/jfs | |
parent | 2e6883bdf49abd0e7f0d9b6297fc3be7ebb2250b (diff) |
introduce I_SYNC
I_LOCK was used for several unrelated purposes, which caused deadlock
situations in certain filesystems as a side effect. One of the purposes
now uses the new I_SYNC bit.
Also document the various bits and change their order from historical to
logical.
[bunk@stusta.de: make fs/inode.c:wake_up_inode() static]
Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: David Chinner <dgc@sgi.com>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 7aa1f7004eaf..e7c60ae6b5b2 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
@@ -1289,7 +1289,14 @@ int txCommit(tid_t tid, /* transaction identifier */ | |||
1289 | * commit the transaction synchronously, so the last iput | 1289 | * commit the transaction synchronously, so the last iput |
1290 | * will be done by the calling thread (or later) | 1290 | * will be done by the calling thread (or later) |
1291 | */ | 1291 | */ |
1292 | if (tblk->u.ip->i_state & I_LOCK) | 1292 | /* |
1293 | * I believe this code is no longer needed. Splitting I_LOCK | ||
1294 | * into two bits, I_LOCK and I_SYNC should prevent this | ||
1295 | * deadlock as well. But since I don't have a JFS testload | ||
1296 | * to verify this, only a trivial s/I_LOCK/I_SYNC/ was done. | ||
1297 | * Joern | ||
1298 | */ | ||
1299 | if (tblk->u.ip->i_state & I_SYNC) | ||
1293 | tblk->xflag &= ~COMMIT_LAZY; | 1300 | tblk->xflag &= ~COMMIT_LAZY; |
1294 | } | 1301 | } |
1295 | 1302 | ||