aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_txnmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/jfs_txnmgr.c')
-rw-r--r--fs/jfs/jfs_txnmgr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index 2ddb6b892bcf..d38f605d9481 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -2876,10 +2876,10 @@ restart:
2876 */ 2876 */
2877 TXN_UNLOCK(); 2877 TXN_UNLOCK();
2878 tid = txBegin(ip->i_sb, COMMIT_INODE | COMMIT_FORCE); 2878 tid = txBegin(ip->i_sb, COMMIT_INODE | COMMIT_FORCE);
2879 down(&jfs_ip->commit_sem); 2879 mutex_lock(&jfs_ip->commit_mutex);
2880 txCommit(tid, 1, &ip, 0); 2880 txCommit(tid, 1, &ip, 0);
2881 txEnd(tid); 2881 txEnd(tid);
2882 up(&jfs_ip->commit_sem); 2882 mutex_unlock(&jfs_ip->commit_mutex);
2883 /* 2883 /*
2884 * Just to be safe. I don't know how 2884 * Just to be safe. I don't know how
2885 * long we can run without blocking 2885 * long we can run without blocking
@@ -2952,7 +2952,7 @@ int jfs_sync(void *arg)
2952 * Inode is being freed 2952 * Inode is being freed
2953 */ 2953 */
2954 list_del_init(&jfs_ip->anon_inode_list); 2954 list_del_init(&jfs_ip->anon_inode_list);
2955 } else if (! down_trylock(&jfs_ip->commit_sem)) { 2955 } else if (! !mutex_trylock(&jfs_ip->commit_mutex)) {
2956 /* 2956 /*
2957 * inode will be removed from anonymous list 2957 * inode will be removed from anonymous list
2958 * when it is committed 2958 * when it is committed
@@ -2961,7 +2961,7 @@ int jfs_sync(void *arg)
2961 tid = txBegin(ip->i_sb, COMMIT_INODE); 2961 tid = txBegin(ip->i_sb, COMMIT_INODE);
2962 rc = txCommit(tid, 1, &ip, 0); 2962 rc = txCommit(tid, 1, &ip, 0);
2963 txEnd(tid); 2963 txEnd(tid);
2964 up(&jfs_ip->commit_sem); 2964 mutex_unlock(&jfs_ip->commit_mutex);
2965 2965
2966 iput(ip); 2966 iput(ip);
2967 /* 2967 /*
@@ -2971,7 +2971,7 @@ int jfs_sync(void *arg)
2971 cond_resched(); 2971 cond_resched();
2972 TXN_LOCK(); 2972 TXN_LOCK();
2973 } else { 2973 } else {
2974 /* We can't get the commit semaphore. It may 2974 /* We can't get the commit mutex. It may
2975 * be held by a thread waiting for tlock's 2975 * be held by a thread waiting for tlock's
2976 * so let's not block here. Save it to 2976 * so let's not block here. Save it to
2977 * put back on the anon_list. 2977 * put back on the anon_list.