aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:58 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:29 -0500
commitb74c79e99389cd79b31fcc08f82c24e492e63c7e (patch)
tree763c6b412517306670bc625e90035f2d16bb739f /include
parent34286d6662308d82aed891852d04c7c3a2649b16 (diff)
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/coda_linux.h2
-rw-r--r--include/linux/fs.h10
-rw-r--r--include/linux/generic_acl.h2
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/reiserfs_xattr.h2
5 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 2e914d0771b9..4ccc59c1ea82 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -37,7 +37,7 @@ extern const struct file_operations coda_ioctl_operations;
37/* operations shared over more than one file */ 37/* operations shared over more than one file */
38int coda_open(struct inode *i, struct file *f); 38int coda_open(struct inode *i, struct file *f);
39int coda_release(struct inode *i, struct file *f); 39int coda_release(struct inode *i, struct file *f);
40int coda_permission(struct inode *inode, int mask); 40int coda_permission(struct inode *inode, int mask, unsigned int flags);
41int coda_revalidate_inode(struct dentry *); 41int coda_revalidate_inode(struct dentry *);
42int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); 42int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
43int coda_setattr(struct dentry *, struct iattr *); 43int coda_setattr(struct dentry *, struct iattr *);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a04aa96acb71..d5a4d42f655b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1550,11 +1550,13 @@ struct file_operations {
1550 int (*setlease)(struct file *, long, struct file_lock **); 1550 int (*setlease)(struct file *, long, struct file_lock **);
1551}; 1551};
1552 1552
1553#define IPERM_FLAG_RCU 0x0001
1554
1553struct inode_operations { 1555struct inode_operations {
1554 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); 1556 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
1555 void * (*follow_link) (struct dentry *, struct nameidata *); 1557 void * (*follow_link) (struct dentry *, struct nameidata *);
1556 int (*permission) (struct inode *, int); 1558 int (*permission) (struct inode *, int, unsigned int);
1557 int (*check_acl)(struct inode *, int); 1559 int (*check_acl)(struct inode *, int, unsigned int);
1558 1560
1559 int (*readlink) (struct dentry *, char __user *,int); 1561 int (*readlink) (struct dentry *, char __user *,int);
1560 void (*put_link) (struct dentry *, struct nameidata *, void *); 1562 void (*put_link) (struct dentry *, struct nameidata *, void *);
@@ -2165,8 +2167,8 @@ extern sector_t bmap(struct inode *, sector_t);
2165#endif 2167#endif
2166extern int notify_change(struct dentry *, struct iattr *); 2168extern int notify_change(struct dentry *, struct iattr *);
2167extern int inode_permission(struct inode *, int); 2169extern int inode_permission(struct inode *, int);
2168extern int generic_permission(struct inode *, int, 2170extern int generic_permission(struct inode *, int, unsigned int,
2169 int (*check_acl)(struct inode *, int)); 2171 int (*check_acl)(struct inode *, int, unsigned int));
2170 2172
2171static inline bool execute_ok(struct inode *inode) 2173static inline bool execute_ok(struct inode *inode)
2172{ 2174{
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h
index 574bea4013b6..0437e377b555 100644
--- a/include/linux/generic_acl.h
+++ b/include/linux/generic_acl.h
@@ -10,6 +10,6 @@ extern const struct xattr_handler generic_acl_default_handler;
10 10
11int generic_acl_init(struct inode *, struct inode *); 11int generic_acl_init(struct inode *, struct inode *);
12int generic_acl_chmod(struct inode *); 12int generic_acl_chmod(struct inode *);
13int generic_check_acl(struct inode *inode, int mask); 13int generic_check_acl(struct inode *inode, int mask, unsigned int flags);
14 14
15#endif /* LINUX_GENERIC_ACL_H */ 15#endif /* LINUX_GENERIC_ACL_H */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 29d504d5d1c3..0779bb8f95be 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -351,7 +351,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
351extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); 351extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
352extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); 352extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr);
353extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 353extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
354extern int nfs_permission(struct inode *, int); 354extern int nfs_permission(struct inode *, int, unsigned int);
355extern int nfs_open(struct inode *, struct file *); 355extern int nfs_open(struct inode *, struct file *);
356extern int nfs_release(struct inode *, struct file *); 356extern int nfs_release(struct inode *, struct file *);
357extern int nfs_attribute_timeout(struct inode *inode); 357extern int nfs_attribute_timeout(struct inode *inode);
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index b2cf2089769b..3b94c91f20a6 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -41,7 +41,7 @@ int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
41int reiserfs_lookup_privroot(struct super_block *sb); 41int reiserfs_lookup_privroot(struct super_block *sb);
42int reiserfs_delete_xattrs(struct inode *inode); 42int reiserfs_delete_xattrs(struct inode *inode);
43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); 43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs);
44int reiserfs_permission(struct inode *inode, int mask); 44int reiserfs_permission(struct inode *inode, int mask, unsigned int flags);
45 45
46#ifdef CONFIG_REISERFS_FS_XATTR 46#ifdef CONFIG_REISERFS_FS_XATTR
47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) 47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)