ocfs2: iput inode alloc when failed locally
[linux.git] / fs / ocfs2 / ioctl.c
index 8ca3c29accbf08f2d7d40aaf53afcee6563a7322..490229f43731caae647d091eb6425479db871636 100644 (file)
@@ -413,11 +413,12 @@ int ocfs2_info_handle_freeinode(struct inode *inode,
                }
 
                status = ocfs2_info_scan_inode_alloc(osb, inode_alloc, blkno, oifi, i);
-               if (status < 0)
-                       goto bail;
 
                iput(inode_alloc);
                inode_alloc = NULL;
+
+               if (status < 0)
+                       goto bail;
        }
 
        o2info_set_request_filled(&oifi->ifi_req);