diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 1277666c77cd..4cfd7b3d3e1a 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -2126,7 +2126,7 @@ static int ocfs2_lookup_lock_orphan_dir(struct ocfs2_super *osb, return ret; } - inode_lock(orphan_dir_inode); + inode_lock_nested(orphan_dir_inode, I_MUTEX_NONDIR2); ret = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); if (ret < 0) { @@ -2725,7 +2725,7 @@ int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb, goto bail; } - inode_lock(orphan_dir_inode); + inode_lock_nested(orphan_dir_inode, I_MUTEX_NONDIR2); status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); if (status < 0) { inode_unlock(orphan_dir_inode); @@ -2838,7 +2838,7 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir, goto leave; } - inode_lock(orphan_dir_inode); + inode_lock_nested(orphan_dir_inode, I_MUTEX_NONDIR2); status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); if (status < 0) {