diff options
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 3a2769ebfe4a..5d5ebbcba534 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -155,7 +155,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, | |||
155 | if (error) | 155 | if (error) |
156 | goto out; | 156 | goto out; |
157 | 157 | ||
158 | error = gfs2_repermission(dir, MAY_WRITE | MAY_EXEC, NULL); | 158 | error = permission(dir, MAY_WRITE | MAY_EXEC, NULL); |
159 | if (error) | 159 | if (error) |
160 | goto out_gunlock; | 160 | goto out_gunlock; |
161 | 161 | ||
@@ -659,7 +659,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, | |||
659 | } | 659 | } |
660 | } | 660 | } |
661 | } else { | 661 | } else { |
662 | error = gfs2_repermission(ndir, MAY_WRITE | MAY_EXEC, NULL); | 662 | error = permission(ndir, MAY_WRITE | MAY_EXEC, NULL); |
663 | if (error) | 663 | if (error) |
664 | goto out_gunlock; | 664 | goto out_gunlock; |
665 | 665 | ||
@@ -694,7 +694,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, | |||
694 | /* Check out the dir to be renamed */ | 694 | /* Check out the dir to be renamed */ |
695 | 695 | ||
696 | if (dir_rename) { | 696 | if (dir_rename) { |
697 | error = gfs2_repermission(odentry->d_inode, MAY_WRITE, NULL); | 697 | error = permission(odentry->d_inode, MAY_WRITE, NULL); |
698 | if (error) | 698 | if (error) |
699 | goto out_gunlock; | 699 | goto out_gunlock; |
700 | } | 700 | } |
@@ -888,9 +888,7 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd) | |||
888 | if (ip->i_vn == ip->i_gl->gl_vn) | 888 | if (ip->i_vn == ip->i_gl->gl_vn) |
889 | return generic_permission(inode, mask, gfs2_check_acl); | 889 | return generic_permission(inode, mask, gfs2_check_acl); |
890 | 890 | ||
891 | error = gfs2_glock_nq_init(ip->i_gl, | 891 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); |
892 | LM_ST_SHARED, LM_FLAG_ANY, | ||
893 | &i_gh); | ||
894 | if (!error) { | 892 | if (!error) { |
895 | error = generic_permission(inode, mask, gfs2_check_acl_locked); | 893 | error = generic_permission(inode, mask, gfs2_check_acl_locked); |
896 | gfs2_glock_dq_uninit(&i_gh); | 894 | gfs2_glock_dq_uninit(&i_gh); |