aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index b776ec8f9c19..b1090d66a6fd 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -307,7 +307,7 @@ struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name,
307 } 307 }
308 308
309 if (!is_root) { 309 if (!is_root) {
310 error = gfs2_permission(dir, MAY_EXEC, 0); 310 error = gfs2_permission(dir, MAY_EXEC);
311 if (error) 311 if (error)
312 goto out; 312 goto out;
313 } 313 }
@@ -337,7 +337,7 @@ static int create_ok(struct gfs2_inode *dip, const struct qstr *name,
337{ 337{
338 int error; 338 int error;
339 339
340 error = gfs2_permission(&dip->i_inode, MAY_WRITE | MAY_EXEC, 0); 340 error = gfs2_permission(&dip->i_inode, MAY_WRITE | MAY_EXEC);
341 if (error) 341 if (error)
342 return error; 342 return error;
343 343
@@ -857,7 +857,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
857 if (inode->i_nlink == 0) 857 if (inode->i_nlink == 0)
858 goto out_gunlock; 858 goto out_gunlock;
859 859
860 error = gfs2_permission(dir, MAY_WRITE | MAY_EXEC, 0); 860 error = gfs2_permission(dir, MAY_WRITE | MAY_EXEC);
861 if (error) 861 if (error)
862 goto out_gunlock; 862 goto out_gunlock;
863 863
@@ -990,7 +990,7 @@ static int gfs2_unlink_ok(struct gfs2_inode *dip, const struct qstr *name,
990 if (IS_APPEND(&dip->i_inode)) 990 if (IS_APPEND(&dip->i_inode))
991 return -EPERM; 991 return -EPERM;
992 992
993 error = gfs2_permission(&dip->i_inode, MAY_WRITE | MAY_EXEC, 0); 993 error = gfs2_permission(&dip->i_inode, MAY_WRITE | MAY_EXEC);
994 if (error) 994 if (error)
995 return error; 995 return error;
996 996
@@ -1336,7 +1336,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
1336 } 1336 }
1337 } 1337 }
1338 } else { 1338 } else {
1339 error = gfs2_permission(ndir, MAY_WRITE | MAY_EXEC, 0); 1339 error = gfs2_permission(ndir, MAY_WRITE | MAY_EXEC);
1340 if (error) 1340 if (error)
1341 goto out_gunlock; 1341 goto out_gunlock;
1342 1342
@@ -1371,7 +1371,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
1371 /* Check out the dir to be renamed */ 1371 /* Check out the dir to be renamed */
1372 1372
1373 if (dir_rename) { 1373 if (dir_rename) {
1374 error = gfs2_permission(odentry->d_inode, MAY_WRITE, 0); 1374 error = gfs2_permission(odentry->d_inode, MAY_WRITE);
1375 if (error) 1375 if (error)
1376 goto out_gunlock; 1376 goto out_gunlock;
1377 } 1377 }
@@ -1543,7 +1543,7 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
1543 * Returns: errno 1543 * Returns: errno
1544 */ 1544 */
1545 1545
1546int gfs2_permission(struct inode *inode, int mask, unsigned int flags) 1546int gfs2_permission(struct inode *inode, int mask)
1547{ 1547{
1548 struct gfs2_inode *ip; 1548 struct gfs2_inode *ip;
1549 struct gfs2_holder i_gh; 1549 struct gfs2_holder i_gh;
@@ -1553,7 +1553,7 @@ int gfs2_permission(struct inode *inode, int mask, unsigned int flags)
1553 1553
1554 ip = GFS2_I(inode); 1554 ip = GFS2_I(inode);
1555 if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { 1555 if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
1556 if (flags & IPERM_FLAG_RCU) 1556 if (mask & MAY_NOT_BLOCK)
1557 return -ECHILD; 1557 return -ECHILD;
1558 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); 1558 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
1559 if (error) 1559 if (error)