Last time we found there is lock/unlock bug in ocfs2_file_aio_write, and then we did a thorough search for all lock resources in ocfs2_inode_info, including rw, inode and open lockres and found this bug. My kernel version is 3.0.13, and it is also in the lastest version 3.9. In ocfs2_fiemap, once ocfs2_get_clusters_nocache failed, it should goto out_unlock instead of out, because we need release buffer head, up read alloc sem and unlock inode.
Unified · Split
| @@ -790,7 +790,7 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 789 unmodified lines | ||
| 790 | 790 | &hole_size, &rec, &is_last); |
| 791 | 791 | if (ret) { |
| 792 | 792 | mlog_errno(ret); |
| 793 | − goto out; | |
| 793 | + goto out_unlock; | |
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | if (rec.e_blkno == 0ULL) { |