aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4a853ef6fd35..001ded4845b4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -82,6 +82,14 @@ extern int dir_notify_enable;
82 (specialy hack for floppy.c) */ 82 (specialy hack for floppy.c) */
83#define FMODE_WRITE_IOCTL ((__force fmode_t)128) 83#define FMODE_WRITE_IOCTL ((__force fmode_t)128)
84 84
85/*
86 * Don't update ctime and mtime.
87 *
88 * Currently a special hack for the XFS open_by_handle ioctl, but we'll
89 * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
90 */
91#define FMODE_NOCMTIME ((__force fmode_t)2048)
92
85#define RW_MASK 1 93#define RW_MASK 1
86#define RWA_MASK 2 94#define RWA_MASK 2
87#define READ 0 95#define READ 0
@@ -316,6 +324,7 @@ struct poll_table_struct;
316struct kstatfs; 324struct kstatfs;
317struct vm_area_struct; 325struct vm_area_struct;
318struct vfsmount; 326struct vfsmount;
327struct cred;
319 328
320extern void __init inode_init(void); 329extern void __init inode_init(void);
321extern void __init inode_init_early(void); 330extern void __init inode_init_early(void);
@@ -827,7 +836,7 @@ struct file {
827 fmode_t f_mode; 836 fmode_t f_mode;
828 loff_t f_pos; 837 loff_t f_pos;
829 struct fown_struct f_owner; 838 struct fown_struct f_owner;
830 unsigned int f_uid, f_gid; 839 const struct cred *f_cred;
831 struct file_ra_state f_ra; 840 struct file_ra_state f_ra;
832 841
833 u64 f_version; 842 u64 f_version;
@@ -1194,7 +1203,7 @@ enum {
1194#define has_fs_excl() atomic_read(&current->fs_excl) 1203#define has_fs_excl() atomic_read(&current->fs_excl)
1195 1204
1196#define is_owner_or_cap(inode) \ 1205#define is_owner_or_cap(inode) \
1197 ((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER)) 1206 ((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER))
1198 1207
1199/* not quite ready to be deprecated, but... */ 1208/* not quite ready to be deprecated, but... */
1200extern void lock_super(struct super_block *); 1209extern void lock_super(struct super_block *);
@@ -1674,7 +1683,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
1674extern long do_sys_open(int dfd, const char __user *filename, int flags, 1683extern long do_sys_open(int dfd, const char __user *filename, int flags,
1675 int mode); 1684 int mode);
1676extern struct file *filp_open(const char *, int, int); 1685extern struct file *filp_open(const char *, int, int);
1677extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); 1686extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
1687 const struct cred *);
1678extern int filp_close(struct file *, fl_owner_t id); 1688extern int filp_close(struct file *, fl_owner_t id);
1679extern char * getname(const char __user *); 1689extern char * getname(const char __user *);
1680 1690
@@ -1875,7 +1885,9 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
1875 1885
1876extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); 1886extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
1877 1887
1888extern struct inode * inode_init_always(struct super_block *, struct inode *);
1878extern void inode_init_once(struct inode *); 1889extern void inode_init_once(struct inode *);
1890extern void inode_add_to_lists(struct super_block *, struct inode *);
1879extern void iput(struct inode *); 1891extern void iput(struct inode *);
1880extern struct inode * igrab(struct inode *); 1892extern struct inode * igrab(struct inode *);
1881extern ino_t iunique(struct super_block *, ino_t); 1893extern ino_t iunique(struct super_block *, ino_t);