diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index ffd4feece..13342b2e4 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -358,6 +358,9 @@ tid_t txBegin(struct super_block *sb, int flag) INCREMENT(TxStat.txBegin); + if (!log) + return 0; + retry: if (!(flag & COMMIT_FORCE)) { /* diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index b29d68b5e..ad2a8fc6f 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -800,6 +800,8 @@ static int jfs_link(struct dentry *old_dentry, goto out; tid = txBegin(ip->i_sb, 0); + if (tid == 0) + goto out; mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT); mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);