diff options
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r-- | fs/ocfs2/namei.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 6295fd6ae469..74018caf8053 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -115,7 +115,7 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
115 | mlog(0, "find name %.*s in directory %llu\n", dentry->d_name.len, | 115 | mlog(0, "find name %.*s in directory %llu\n", dentry->d_name.len, |
116 | dentry->d_name.name, (unsigned long long)OCFS2_I(dir)->ip_blkno); | 116 | dentry->d_name.name, (unsigned long long)OCFS2_I(dir)->ip_blkno); |
117 | 117 | ||
118 | status = ocfs2_meta_lock(dir, NULL, 0); | 118 | status = ocfs2_inode_lock(dir, NULL, 0); |
119 | if (status < 0) { | 119 | if (status < 0) { |
120 | if (status != -ENOENT) | 120 | if (status != -ENOENT) |
121 | mlog_errno(status); | 121 | mlog_errno(status); |
@@ -176,7 +176,7 @@ bail_unlock: | |||
176 | * unlink on another node will message us to remove that | 176 | * unlink on another node will message us to remove that |
177 | * dentry under this lock so otherwise we can race this with | 177 | * dentry under this lock so otherwise we can race this with |
178 | * the downconvert thread and have a stale dentry. */ | 178 | * the downconvert thread and have a stale dentry. */ |
179 | ocfs2_meta_unlock(dir, 0); | 179 | ocfs2_inode_unlock(dir, 0); |
180 | 180 | ||
181 | bail: | 181 | bail: |
182 | 182 | ||
@@ -208,7 +208,7 @@ static int ocfs2_mknod(struct inode *dir, | |||
208 | /* get our super block */ | 208 | /* get our super block */ |
209 | osb = OCFS2_SB(dir->i_sb); | 209 | osb = OCFS2_SB(dir->i_sb); |
210 | 210 | ||
211 | status = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 211 | status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
212 | if (status < 0) { | 212 | if (status < 0) { |
213 | if (status != -ENOENT) | 213 | if (status != -ENOENT) |
214 | mlog_errno(status); | 214 | mlog_errno(status); |
@@ -322,7 +322,7 @@ leave: | |||
322 | if (handle) | 322 | if (handle) |
323 | ocfs2_commit_trans(osb, handle); | 323 | ocfs2_commit_trans(osb, handle); |
324 | 324 | ||
325 | ocfs2_meta_unlock(dir, 1); | 325 | ocfs2_inode_unlock(dir, 1); |
326 | 326 | ||
327 | if (status == -ENOSPC) | 327 | if (status == -ENOSPC) |
328 | mlog(0, "Disk is full\n"); | 328 | mlog(0, "Disk is full\n"); |
@@ -552,7 +552,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
552 | if (S_ISDIR(inode->i_mode)) | 552 | if (S_ISDIR(inode->i_mode)) |
553 | return -EPERM; | 553 | return -EPERM; |
554 | 554 | ||
555 | err = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 555 | err = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
556 | if (err < 0) { | 556 | if (err < 0) { |
557 | if (err != -ENOENT) | 557 | if (err != -ENOENT) |
558 | mlog_errno(err); | 558 | mlog_errno(err); |
@@ -577,7 +577,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
577 | goto out; | 577 | goto out; |
578 | } | 578 | } |
579 | 579 | ||
580 | err = ocfs2_meta_lock(inode, &fe_bh, 1); | 580 | err = ocfs2_inode_lock(inode, &fe_bh, 1); |
581 | if (err < 0) { | 581 | if (err < 0) { |
582 | if (err != -ENOENT) | 582 | if (err != -ENOENT) |
583 | mlog_errno(err); | 583 | mlog_errno(err); |
@@ -642,10 +642,10 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
642 | out_commit: | 642 | out_commit: |
643 | ocfs2_commit_trans(osb, handle); | 643 | ocfs2_commit_trans(osb, handle); |
644 | out_unlock_inode: | 644 | out_unlock_inode: |
645 | ocfs2_meta_unlock(inode, 1); | 645 | ocfs2_inode_unlock(inode, 1); |
646 | 646 | ||
647 | out: | 647 | out: |
648 | ocfs2_meta_unlock(dir, 1); | 648 | ocfs2_inode_unlock(dir, 1); |
649 | 649 | ||
650 | if (de_bh) | 650 | if (de_bh) |
651 | brelse(de_bh); | 651 | brelse(de_bh); |
@@ -719,7 +719,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
719 | return -EPERM; | 719 | return -EPERM; |
720 | } | 720 | } |
721 | 721 | ||
722 | status = ocfs2_meta_lock(dir, &parent_node_bh, 1); | 722 | status = ocfs2_inode_lock(dir, &parent_node_bh, 1); |
723 | if (status < 0) { | 723 | if (status < 0) { |
724 | if (status != -ENOENT) | 724 | if (status != -ENOENT) |
725 | mlog_errno(status); | 725 | mlog_errno(status); |
@@ -744,7 +744,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
744 | goto leave; | 744 | goto leave; |
745 | } | 745 | } |
746 | 746 | ||
747 | status = ocfs2_meta_lock(inode, &fe_bh, 1); | 747 | status = ocfs2_inode_lock(inode, &fe_bh, 1); |
748 | if (status < 0) { | 748 | if (status < 0) { |
749 | if (status != -ENOENT) | 749 | if (status != -ENOENT) |
750 | mlog_errno(status); | 750 | mlog_errno(status); |
@@ -840,13 +840,13 @@ leave: | |||
840 | ocfs2_commit_trans(osb, handle); | 840 | ocfs2_commit_trans(osb, handle); |
841 | 841 | ||
842 | if (child_locked) | 842 | if (child_locked) |
843 | ocfs2_meta_unlock(inode, 1); | 843 | ocfs2_inode_unlock(inode, 1); |
844 | 844 | ||
845 | ocfs2_meta_unlock(dir, 1); | 845 | ocfs2_inode_unlock(dir, 1); |
846 | 846 | ||
847 | if (orphan_dir) { | 847 | if (orphan_dir) { |
848 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ | 848 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ |
849 | ocfs2_meta_unlock(orphan_dir, 1); | 849 | ocfs2_inode_unlock(orphan_dir, 1); |
850 | mutex_unlock(&orphan_dir->i_mutex); | 850 | mutex_unlock(&orphan_dir->i_mutex); |
851 | iput(orphan_dir); | 851 | iput(orphan_dir); |
852 | } | 852 | } |
@@ -907,7 +907,7 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, | |||
907 | inode1 = tmpinode; | 907 | inode1 = tmpinode; |
908 | } | 908 | } |
909 | /* lock id2 */ | 909 | /* lock id2 */ |
910 | status = ocfs2_meta_lock(inode2, bh2, 1); | 910 | status = ocfs2_inode_lock(inode2, bh2, 1); |
911 | if (status < 0) { | 911 | if (status < 0) { |
912 | if (status != -ENOENT) | 912 | if (status != -ENOENT) |
913 | mlog_errno(status); | 913 | mlog_errno(status); |
@@ -916,14 +916,14 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, | |||
916 | } | 916 | } |
917 | 917 | ||
918 | /* lock id1 */ | 918 | /* lock id1 */ |
919 | status = ocfs2_meta_lock(inode1, bh1, 1); | 919 | status = ocfs2_inode_lock(inode1, bh1, 1); |
920 | if (status < 0) { | 920 | if (status < 0) { |
921 | /* | 921 | /* |
922 | * An error return must mean that no cluster locks | 922 | * An error return must mean that no cluster locks |
923 | * were held on function exit. | 923 | * were held on function exit. |
924 | */ | 924 | */ |
925 | if (oi1->ip_blkno != oi2->ip_blkno) | 925 | if (oi1->ip_blkno != oi2->ip_blkno) |
926 | ocfs2_meta_unlock(inode2, 1); | 926 | ocfs2_inode_unlock(inode2, 1); |
927 | 927 | ||
928 | if (status != -ENOENT) | 928 | if (status != -ENOENT) |
929 | mlog_errno(status); | 929 | mlog_errno(status); |
@@ -936,10 +936,10 @@ bail: | |||
936 | 936 | ||
937 | static void ocfs2_double_unlock(struct inode *inode1, struct inode *inode2) | 937 | static void ocfs2_double_unlock(struct inode *inode1, struct inode *inode2) |
938 | { | 938 | { |
939 | ocfs2_meta_unlock(inode1, 1); | 939 | ocfs2_inode_unlock(inode1, 1); |
940 | 940 | ||
941 | if (inode1 != inode2) | 941 | if (inode1 != inode2) |
942 | ocfs2_meta_unlock(inode2, 1); | 942 | ocfs2_inode_unlock(inode2, 1); |
943 | } | 943 | } |
944 | 944 | ||
945 | static int ocfs2_rename(struct inode *old_dir, | 945 | static int ocfs2_rename(struct inode *old_dir, |
@@ -1034,7 +1034,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1034 | * won't have to concurrently downconvert the inode and the | 1034 | * won't have to concurrently downconvert the inode and the |
1035 | * dentry locks. | 1035 | * dentry locks. |
1036 | */ | 1036 | */ |
1037 | status = ocfs2_meta_lock(old_inode, &old_inode_bh, 1); | 1037 | status = ocfs2_inode_lock(old_inode, &old_inode_bh, 1); |
1038 | if (status < 0) { | 1038 | if (status < 0) { |
1039 | if (status != -ENOENT) | 1039 | if (status != -ENOENT) |
1040 | mlog_errno(status); | 1040 | mlog_errno(status); |
@@ -1143,7 +1143,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1143 | goto bail; | 1143 | goto bail; |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | status = ocfs2_meta_lock(new_inode, &newfe_bh, 1); | 1146 | status = ocfs2_inode_lock(new_inode, &newfe_bh, 1); |
1147 | if (status < 0) { | 1147 | if (status < 0) { |
1148 | if (status != -ENOENT) | 1148 | if (status != -ENOENT) |
1149 | mlog_errno(status); | 1149 | mlog_errno(status); |
@@ -1355,14 +1355,14 @@ bail: | |||
1355 | ocfs2_double_unlock(old_dir, new_dir); | 1355 | ocfs2_double_unlock(old_dir, new_dir); |
1356 | 1356 | ||
1357 | if (old_child_locked) | 1357 | if (old_child_locked) |
1358 | ocfs2_meta_unlock(old_inode, 1); | 1358 | ocfs2_inode_unlock(old_inode, 1); |
1359 | 1359 | ||
1360 | if (new_child_locked) | 1360 | if (new_child_locked) |
1361 | ocfs2_meta_unlock(new_inode, 1); | 1361 | ocfs2_inode_unlock(new_inode, 1); |
1362 | 1362 | ||
1363 | if (orphan_dir) { | 1363 | if (orphan_dir) { |
1364 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ | 1364 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ |
1365 | ocfs2_meta_unlock(orphan_dir, 1); | 1365 | ocfs2_inode_unlock(orphan_dir, 1); |
1366 | mutex_unlock(&orphan_dir->i_mutex); | 1366 | mutex_unlock(&orphan_dir->i_mutex); |
1367 | iput(orphan_dir); | 1367 | iput(orphan_dir); |
1368 | } | 1368 | } |
@@ -1530,7 +1530,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
1530 | credits = ocfs2_calc_symlink_credits(sb); | 1530 | credits = ocfs2_calc_symlink_credits(sb); |
1531 | 1531 | ||
1532 | /* lock the parent directory */ | 1532 | /* lock the parent directory */ |
1533 | status = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 1533 | status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
1534 | if (status < 0) { | 1534 | if (status < 0) { |
1535 | if (status != -ENOENT) | 1535 | if (status != -ENOENT) |
1536 | mlog_errno(status); | 1536 | mlog_errno(status); |
@@ -1657,7 +1657,7 @@ bail: | |||
1657 | if (handle) | 1657 | if (handle) |
1658 | ocfs2_commit_trans(osb, handle); | 1658 | ocfs2_commit_trans(osb, handle); |
1659 | 1659 | ||
1660 | ocfs2_meta_unlock(dir, 1); | 1660 | ocfs2_inode_unlock(dir, 1); |
1661 | 1661 | ||
1662 | if (new_fe_bh) | 1662 | if (new_fe_bh) |
1663 | brelse(new_fe_bh); | 1663 | brelse(new_fe_bh); |
@@ -1735,7 +1735,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
1735 | 1735 | ||
1736 | mutex_lock(&orphan_dir_inode->i_mutex); | 1736 | mutex_lock(&orphan_dir_inode->i_mutex); |
1737 | 1737 | ||
1738 | status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1); | 1738 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
1739 | if (status < 0) { | 1739 | if (status < 0) { |
1740 | mlog_errno(status); | 1740 | mlog_errno(status); |
1741 | goto leave; | 1741 | goto leave; |
@@ -1745,7 +1745,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
1745 | orphan_dir_bh, name, | 1745 | orphan_dir_bh, name, |
1746 | OCFS2_ORPHAN_NAMELEN, de_bh); | 1746 | OCFS2_ORPHAN_NAMELEN, de_bh); |
1747 | if (status < 0) { | 1747 | if (status < 0) { |
1748 | ocfs2_meta_unlock(orphan_dir_inode, 1); | 1748 | ocfs2_inode_unlock(orphan_dir_inode, 1); |
1749 | 1749 | ||
1750 | mlog_errno(status); | 1750 | mlog_errno(status); |
1751 | goto leave; | 1751 | goto leave; |