History

ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap()

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.

Joseph Qi committed 13 years ago

Commit b4ca2b41 parent 10b3a321 file · +1 −1Browse files

Unified · Split

fs/ocfs2/extent_map.c+1−1
@@ -790,7 +790,7 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 789 unmodified lines
790 &hole_size, &rec, &is_last);790 &hole_size, &rec, &is_last);
791 if (ret) {791 if (ret) {
792 mlog_errno(ret);792 mlog_errno(ret);
793 goto out;793 goto out_unlock;
794 }794 }
795 795
796 if (rec.e_blkno == 0ULL) {796 if (rec.e_blkno == 0ULL) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t