diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-09-02 15:28:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:06 -0400 |
commit | aeb5d727062a0238a2f96c9c380fbd2be4640c6f (patch) | |
tree | 51dae8a071fcf42e4431a66d37c5b843c8e99cf6 /include/linux/fs.h | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
[PATCH] introduce fmode_t, do annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 16 |
1 files changed, 8 insertions, 8 deletions
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); | |||
1714 | extern void bd_set_size(struct block_device *, loff_t size); | 1714 | extern void bd_set_size(struct block_device *, loff_t size); |
1715 | extern void bd_forget(struct inode *inode); | 1715 | extern void bd_forget(struct inode *inode); |
1716 | extern void bdput(struct block_device *); | 1716 | extern void bdput(struct block_device *); |
1717 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1717 | extern struct block_device *open_by_devnum(dev_t, fmode_t); |
1718 | #else | 1718 | #else |
1719 | static inline void bd_forget(struct inode *inode) {} | 1719 | static 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); |
1731 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1731 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
1732 | extern int blkdev_get(struct block_device *, mode_t, unsigned); | 1732 | extern int blkdev_get(struct block_device *, fmode_t, unsigned); |
1733 | extern int blkdev_put(struct block_device *); | 1733 | extern int blkdev_put(struct block_device *); |
1734 | extern int bd_claim(struct block_device *, void *); | 1734 | extern int bd_claim(struct block_device *, void *); |
1735 | extern void bd_release(struct block_device *); | 1735 | extern void bd_release(struct block_device *); |