jfs: Add missing mutex_unlock call to error path
[sfrench/cifs-2.6.git] / fs / jfs / jfs_imap.c
index 0f94381ca6d081a6e50af4c33f8228d60f10318a..0fc30407f03912e98a41cadd345afb88282b36f0 100644 (file)
 #include "jfs_superblock.h"
 #include "jfs_debug.h"
 
-/*
- * __mark_inode_dirty expects inodes to be hashed.  Since we don't want
- * special inodes in the fileset inode space, we make them appear hashed,
- * but do not put on any lists.
- */
-
 /*
  * imap locks
  */
@@ -497,7 +491,9 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
        release_metapage(mp);
 
        /*
-        * that will look hashed, but won't be on any list; hlist_del()
+        * __mark_inode_dirty expects inodes to be hashed.  Since we don't
+        * want special inodes in the fileset inode space, we make them
+        * appear hashed, but do not put on any lists.  hlist_del()
         * will work fine and require no locking.
         */
        ip->i_hash.pprev = &ip->i_hash.next;
@@ -2575,6 +2571,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
 
                        txAbort(tid, 0);
                        txEnd(tid);
+                       mutex_unlock(&JFS_IP(ipimap)->commit_mutex);
 
                        /* release the inode map lock */
                        IWRITE_UNLOCK(ipimap);