aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h3
-rw-r--r--include/linux/device-mapper.h8
-rw-r--r--include/linux/file.h4
-rw-r--r--include/linux/fs.h16
-rw-r--r--include/linux/fsnotify.h2
-rw-r--r--include/linux/types.h1
6 files changed, 18 insertions, 16 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b4fe68fe3a57..a4413ec3cb3a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -910,7 +910,8 @@ static inline int sb_issue_discard(struct super_block *sb,
910* command filter functions 910* command filter functions
911*/ 911*/
912extern int blk_verify_command(struct blk_cmd_filter *filter, 912extern int blk_verify_command(struct blk_cmd_filter *filter,
913 unsigned char *cmd, int has_write_perm); 913 unsigned char *cmd, fmode_t has_write_perm);
914extern void blk_unregister_filter(struct gendisk *disk);
914extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); 915extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
915 916
916#define MAX_PHYS_SEGMENTS 128 917#define MAX_PHYS_SEGMENTS 128
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 08d783592b73..3f8d4e763672 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -85,7 +85,7 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev);
85 85
86struct dm_dev { 86struct dm_dev {
87 struct block_device *bdev; 87 struct block_device *bdev;
88 int mode; 88 fmode_t mode;
89 char name[16]; 89 char name[16];
90}; 90};
91 91
@@ -95,7 +95,7 @@ struct dm_dev {
95 * FIXME: too many arguments. 95 * FIXME: too many arguments.
96 */ 96 */
97int dm_get_device(struct dm_target *ti, const char *path, sector_t start, 97int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
98 sector_t len, int mode, struct dm_dev **result); 98 sector_t len, fmode_t mode, struct dm_dev **result);
99void dm_put_device(struct dm_target *ti, struct dm_dev *d); 99void dm_put_device(struct dm_target *ti, struct dm_dev *d);
100 100
101/* 101/*
@@ -223,7 +223,7 @@ int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
223/* 223/*
224 * First create an empty table. 224 * First create an empty table.
225 */ 225 */
226int dm_table_create(struct dm_table **result, int mode, 226int dm_table_create(struct dm_table **result, fmode_t mode,
227 unsigned num_targets, struct mapped_device *md); 227 unsigned num_targets, struct mapped_device *md);
228 228
229/* 229/*
@@ -254,7 +254,7 @@ void dm_table_put(struct dm_table *t);
254 */ 254 */
255sector_t dm_table_get_size(struct dm_table *t); 255sector_t dm_table_get_size(struct dm_table *t);
256unsigned int dm_table_get_num_targets(struct dm_table *t); 256unsigned int dm_table_get_num_targets(struct dm_table *t);
257int dm_table_get_mode(struct dm_table *t); 257fmode_t dm_table_get_mode(struct dm_table *t);
258struct mapped_device *dm_table_get_md(struct dm_table *t); 258struct mapped_device *dm_table_get_md(struct dm_table *t);
259 259
260/* 260/*
diff --git a/include/linux/file.h b/include/linux/file.h
index a20259e248a5..335a0a5c316e 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -19,10 +19,10 @@ struct file_operations;
19struct vfsmount; 19struct vfsmount;
20struct dentry; 20struct dentry;
21extern int init_file(struct file *, struct vfsmount *mnt, 21extern int init_file(struct file *, struct vfsmount *mnt,
22 struct dentry *dentry, mode_t mode, 22 struct dentry *dentry, fmode_t mode,
23 const struct file_operations *fop); 23 const struct file_operations *fop);
24extern struct file *alloc_file(struct vfsmount *, struct dentry *dentry, 24extern struct file *alloc_file(struct vfsmount *, struct dentry *dentry,
25 mode_t mode, const struct file_operations *fop); 25 fmode_t mode, const struct file_operations *fop);
26 26
27static inline void fput_light(struct file *file, int fput_needed) 27static inline void fput_light(struct file *file, int fput_needed)
28{ 28{
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a6a625be13fc..60a7a581ba91 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -63,18 +63,18 @@ extern int dir_notify_enable;
63#define MAY_ACCESS 16 63#define MAY_ACCESS 16
64#define MAY_OPEN 32 64#define MAY_OPEN 32
65 65
66#define FMODE_READ 1 66#define FMODE_READ ((__force fmode_t)1)
67#define FMODE_WRITE 2 67#define FMODE_WRITE ((__force fmode_t)2)
68 68
69/* Internal kernel extensions */ 69/* Internal kernel extensions */
70#define FMODE_LSEEK 4 70#define FMODE_LSEEK ((__force fmode_t)4)
71#define FMODE_PREAD 8 71#define FMODE_PREAD ((__force fmode_t)8)
72#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ 72#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
73 73
74/* File is being opened for execution. Primary users of this flag are 74/* File is being opened for execution. Primary users of this flag are
75 distributed filesystems that can use it to achieve correct ETXTBUSY 75 distributed filesystems that can use it to achieve correct ETXTBUSY
76 behavior for cross-node execution/opening_for_writing of files */ 76 behavior for cross-node execution/opening_for_writing of files */
77#define FMODE_EXEC 16 77#define FMODE_EXEC ((__force fmode_t)16)
78 78
79#define RW_MASK 1 79#define RW_MASK 1
80#define RWA_MASK 2 80#define RWA_MASK 2
@@ -825,7 +825,7 @@ struct file {
825 const struct file_operations *f_op; 825 const struct file_operations *f_op;
826 atomic_long_t f_count; 826 atomic_long_t f_count;
827 unsigned int f_flags; 827 unsigned int f_flags;
828 mode_t f_mode; 828 fmode_t f_mode;
829 loff_t f_pos; 829 loff_t f_pos;
830 struct fown_struct f_owner; 830 struct fown_struct f_owner;
831 unsigned int f_uid, f_gid; 831 unsigned int f_uid, f_gid;
@@ -1714,7 +1714,7 @@ extern struct block_device *bdget(dev_t);
1714extern void bd_set_size(struct block_device *, loff_t size); 1714extern void bd_set_size(struct block_device *, loff_t size);
1715extern void bd_forget(struct inode *inode); 1715extern void bd_forget(struct inode *inode);
1716extern void bdput(struct block_device *); 1716extern void bdput(struct block_device *);
1717extern struct block_device *open_by_devnum(dev_t, unsigned); 1717extern struct block_device *open_by_devnum(dev_t, fmode_t);
1718#else 1718#else
1719static inline void bd_forget(struct inode *inode) {} 1719static inline void bd_forget(struct inode *inode) {}
1720#endif 1720#endif
@@ -1729,7 +1729,7 @@ extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
1729 struct gendisk *disk, unsigned cmd, 1729 struct gendisk *disk, unsigned cmd,
1730 unsigned long arg); 1730 unsigned long arg);
1731extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); 1731extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
1732extern int blkdev_get(struct block_device *, mode_t, unsigned); 1732extern int blkdev_get(struct block_device *, fmode_t, unsigned);
1733extern int blkdev_put(struct block_device *); 1733extern int blkdev_put(struct block_device *);
1734extern int bd_claim(struct block_device *, void *); 1734extern int bd_claim(struct block_device *, void *);
1735extern void bd_release(struct block_device *); 1735extern void bd_release(struct block_device *);
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index a89513188ce7..00fbd5b245c9 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -188,7 +188,7 @@ static inline void fsnotify_close(struct file *file)
188 struct dentry *dentry = file->f_path.dentry; 188 struct dentry *dentry = file->f_path.dentry;
189 struct inode *inode = dentry->d_inode; 189 struct inode *inode = dentry->d_inode;
190 const char *name = dentry->d_name.name; 190 const char *name = dentry->d_name.name;
191 mode_t mode = file->f_mode; 191 fmode_t mode = file->f_mode;
192 u32 mask = (mode & FMODE_WRITE) ? IN_CLOSE_WRITE : IN_CLOSE_NOWRITE; 192 u32 mask = (mode & FMODE_WRITE) ? IN_CLOSE_WRITE : IN_CLOSE_NOWRITE;
193 193
194 if (S_ISDIR(inode->i_mode)) 194 if (S_ISDIR(inode->i_mode))
diff --git a/include/linux/types.h b/include/linux/types.h
index f24f7beb47df..1d98330b1f2c 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -190,6 +190,7 @@ typedef __u32 __bitwise __wsum;
190 190
191#ifdef __KERNEL__ 191#ifdef __KERNEL__
192typedef unsigned __bitwise__ gfp_t; 192typedef unsigned __bitwise__ gfp_t;
193typedef unsigned __bitwise__ fmode_t;
193 194
194#ifdef CONFIG_PHYS_ADDR_T_64BIT 195#ifdef CONFIG_PHYS_ADDR_T_64BIT
195typedef u64 phys_addr_t; 196typedef u64 phys_addr_t;