diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-20 19:28:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:43:24 -0400 |
commit | 10556cb21a0d0b24d95f00ea6df16f599a3345b2 (patch) | |
tree | 3d7d8dfba807805a55c154f1850717bf3b49f343 /fs/gfs2 | |
parent | 2830ba7f34ebb27c4e5b8b6ef408cd6d74860890 (diff) |
->permission() sanitizing: don't pass flags to ->permission()
not used by the instances anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/file.c | 2 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 16 | ||||
-rw-r--r-- | fs/gfs2/inode.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index a9f5cbe45cd9..89c39e53760d 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -243,7 +243,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) | |||
243 | !capable(CAP_LINUX_IMMUTABLE)) | 243 | !capable(CAP_LINUX_IMMUTABLE)) |
244 | goto out; | 244 | goto out; |
245 | if (!IS_IMMUTABLE(inode)) { | 245 | if (!IS_IMMUTABLE(inode)) { |
246 | error = gfs2_permission(inode, MAY_WRITE, 0); | 246 | error = gfs2_permission(inode, MAY_WRITE); |
247 | if (error) | 247 | if (error) |
248 | goto out; | 248 | goto out; |
249 | } | 249 | } |
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 | ||
1546 | int gfs2_permission(struct inode *inode, int mask, unsigned int flags) | 1546 | int 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) |
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 31606076f701..8d90e0c07672 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h | |||
@@ -108,7 +108,7 @@ extern int gfs2_inode_refresh(struct gfs2_inode *ip); | |||
108 | 108 | ||
109 | extern struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, | 109 | extern struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, |
110 | int is_root); | 110 | int is_root); |
111 | extern int gfs2_permission(struct inode *inode, int mask, unsigned int flags); | 111 | extern int gfs2_permission(struct inode *inode, int mask); |
112 | extern int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr); | 112 | extern int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr); |
113 | extern struct inode *gfs2_lookup_simple(struct inode *dip, const char *name); | 113 | extern struct inode *gfs2_lookup_simple(struct inode *dip, const char *name); |
114 | extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); | 114 | extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); |