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.h145
1 files changed, 57 insertions, 88 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 68ca1b0491af..9a96b4d83fc1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -8,6 +8,7 @@
8 8
9#include <linux/limits.h> 9#include <linux/limits.h>
10#include <linux/ioctl.h> 10#include <linux/ioctl.h>
11#include <linux/blk_types.h>
11 12
12/* 13/*
13 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change 14 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
@@ -53,6 +54,7 @@ struct inodes_stat_t {
53#define MAY_APPEND 8 54#define MAY_APPEND 8
54#define MAY_ACCESS 16 55#define MAY_ACCESS 16
55#define MAY_OPEN 32 56#define MAY_OPEN 32
57#define MAY_CHDIR 64
56 58
57/* 59/*
58 * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond 60 * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
@@ -90,6 +92,9 @@ struct inodes_stat_t {
90/* Expect random access pattern */ 92/* Expect random access pattern */
91#define FMODE_RANDOM ((__force fmode_t)0x1000) 93#define FMODE_RANDOM ((__force fmode_t)0x1000)
92 94
95/* File was opened by fanotify and shouldn't generate fanotify events */
96#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
97
93/* 98/*
94 * The below are the various read and write types that we support. Some of 99 * The below are the various read and write types that we support. Some of
95 * them include behavioral modifiers that send information down to the 100 * them include behavioral modifiers that send information down to the
@@ -117,7 +122,7 @@ struct inodes_stat_t {
117 * immediately wait on this read without caring about 122 * immediately wait on this read without caring about
118 * unplugging. 123 * unplugging.
119 * READA Used for read-ahead operations. Lower priority, and the 124 * READA Used for read-ahead operations. Lower priority, and the
120 * block layer could (in theory) choose to ignore this 125 * block layer could (in theory) choose to ignore this
121 * request if it runs into resource problems. 126 * request if it runs into resource problems.
122 * WRITE A normal async write. Device will be plugged. 127 * WRITE A normal async write. Device will be plugged.
123 * SWRITE Like WRITE, but a special case for ll_rw_block() that 128 * SWRITE Like WRITE, but a special case for ll_rw_block() that
@@ -136,7 +141,7 @@ struct inodes_stat_t {
136 * SWRITE_SYNC 141 * SWRITE_SYNC
137 * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. 142 * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer.
138 * See SWRITE. 143 * See SWRITE.
139 * WRITE_BARRIER Like WRITE, but tells the block layer that all 144 * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all
140 * previously submitted writes must be safely on storage 145 * previously submitted writes must be safely on storage
141 * before this one is started. Also guarantees that when 146 * before this one is started. Also guarantees that when
142 * this write is complete, it itself is also safely on 147 * this write is complete, it itself is also safely on
@@ -144,29 +149,32 @@ struct inodes_stat_t {
144 * of this IO. 149 * of this IO.
145 * 150 *
146 */ 151 */
147#define RW_MASK 1 152#define RW_MASK REQ_WRITE
148#define RWA_MASK 2 153#define RWA_MASK REQ_RAHEAD
149#define READ 0 154
150#define WRITE 1 155#define READ 0
151#define READA 2 /* read-ahead - don't block if no resources */ 156#define WRITE RW_MASK
152#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ 157#define READA RWA_MASK
153#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) 158#define SWRITE (WRITE | READA)
154#define READ_META (READ | (1 << BIO_RW_META)) 159
155#define WRITE_SYNC_PLUG (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 160#define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG)
156#define WRITE_SYNC (WRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 161#define READ_META (READ | REQ_META)
157#define WRITE_ODIRECT_PLUG (WRITE | (1 << BIO_RW_SYNCIO)) 162#define WRITE_SYNC_PLUG (WRITE | REQ_SYNC | REQ_NOIDLE)
158#define WRITE_META (WRITE | (1 << BIO_RW_META)) 163#define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
159#define SWRITE_SYNC_PLUG \ 164#define WRITE_ODIRECT_PLUG (WRITE | REQ_SYNC)
160 (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) 165#define WRITE_META (WRITE | REQ_META)
161#define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) 166#define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \
162#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) 167 REQ_HARDBARRIER)
168#define SWRITE_SYNC_PLUG (SWRITE | REQ_SYNC | REQ_NOIDLE)
169#define SWRITE_SYNC (SWRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG)
163 170
164/* 171/*
165 * These aren't really reads or writes, they pass down information about 172 * These aren't really reads or writes, they pass down information about
166 * parts of device that are now unused by the file system. 173 * parts of device that are now unused by the file system.
167 */ 174 */
168#define DISCARD_NOBARRIER (WRITE | (1 << BIO_RW_DISCARD)) 175#define DISCARD_NOBARRIER (WRITE | REQ_DISCARD)
169#define DISCARD_BARRIER (DISCARD_NOBARRIER | (1 << BIO_RW_BARRIER)) 176#define DISCARD_BARRIER (WRITE | REQ_DISCARD | REQ_HARDBARRIER)
177#define DISCARD_SECURE (DISCARD_NOBARRIER | REQ_SECURE)
170 178
171#define SEL_IN 1 179#define SEL_IN 1
172#define SEL_OUT 2 180#define SEL_OUT 2
@@ -209,6 +217,7 @@ struct inodes_stat_t {
209#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ 217#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
210#define MS_I_VERSION (1<<23) /* Update inode I_version field */ 218#define MS_I_VERSION (1<<23) /* Update inode I_version field */
211#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ 219#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
220#define MS_BORN (1<<29)
212#define MS_ACTIVE (1<<30) 221#define MS_ACTIVE (1<<30)
213#define MS_NOUSER (1<<31) 222#define MS_NOUSER (1<<31)
214 223
@@ -309,6 +318,7 @@ struct inodes_stat_t {
309#define BLKALIGNOFF _IO(0x12,122) 318#define BLKALIGNOFF _IO(0x12,122)
310#define BLKPBSZGET _IO(0x12,123) 319#define BLKPBSZGET _IO(0x12,123)
311#define BLKDISCARDZEROES _IO(0x12,124) 320#define BLKDISCARDZEROES _IO(0x12,124)
321#define BLKSECDISCARD _IO(0x12,125)
312 322
313#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ 323#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
314#define FIBMAP _IO(0x00,1) /* bmap access */ 324#define FIBMAP _IO(0x00,1) /* bmap access */
@@ -407,15 +417,13 @@ extern int get_max_files(void);
407extern int sysctl_nr_open; 417extern int sysctl_nr_open;
408extern struct inodes_stat_t inodes_stat; 418extern struct inodes_stat_t inodes_stat;
409extern int leases_enable, lease_break_time; 419extern int leases_enable, lease_break_time;
410#ifdef CONFIG_DNOTIFY
411extern int dir_notify_enable;
412#endif
413 420
414struct buffer_head; 421struct buffer_head;
415typedef int (get_block_t)(struct inode *inode, sector_t iblock, 422typedef int (get_block_t)(struct inode *inode, sector_t iblock,
416 struct buffer_head *bh_result, int create); 423 struct buffer_head *bh_result, int create);
417typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, 424typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
418 ssize_t bytes, void *private); 425 ssize_t bytes, void *private, int ret,
426 bool is_async);
419 427
420/* 428/*
421 * Attribute flags. These should be or-ed together to figure out what 429 * Attribute flags. These should be or-ed together to figure out what
@@ -685,6 +693,7 @@ struct block_device {
685 */ 693 */
686#define PAGECACHE_TAG_DIRTY 0 694#define PAGECACHE_TAG_DIRTY 0
687#define PAGECACHE_TAG_WRITEBACK 1 695#define PAGECACHE_TAG_WRITEBACK 1
696#define PAGECACHE_TAG_TOWRITE 2
688 697
689int mapping_tagged(struct address_space *mapping, int tag); 698int mapping_tagged(struct address_space *mapping, int tag);
690 699
@@ -768,12 +777,7 @@ struct inode {
768 777
769#ifdef CONFIG_FSNOTIFY 778#ifdef CONFIG_FSNOTIFY
770 __u32 i_fsnotify_mask; /* all events this inode cares about */ 779 __u32 i_fsnotify_mask; /* all events this inode cares about */
771 struct hlist_head i_fsnotify_mark_entries; /* fsnotify mark entries */ 780 struct hlist_head i_fsnotify_marks;
772#endif
773
774#ifdef CONFIG_INOTIFY
775 struct list_head inotify_watches; /* watches on this inode */
776 struct mutex inotify_mutex; /* protects the watches list */
777#endif 781#endif
778 782
779 unsigned long i_state; 783 unsigned long i_state;
@@ -1479,8 +1483,8 @@ struct block_device_operations;
1479 1483
1480/* 1484/*
1481 * NOTE: 1485 * NOTE:
1482 * read, write, poll, fsync, readv, writev, unlocked_ioctl and compat_ioctl 1486 * all file operations except setlease can be called without
1483 * can be called without the big kernel lock held in all filesystems. 1487 * the big kernel lock held in all filesystems.
1484 */ 1488 */
1485struct file_operations { 1489struct file_operations {
1486 struct module *owner; 1490 struct module *owner;
@@ -1491,7 +1495,6 @@ struct file_operations {
1491 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 1495 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
1492 int (*readdir) (struct file *, void *, filldir_t); 1496 int (*readdir) (struct file *, void *, filldir_t);
1493 unsigned int (*poll) (struct file *, struct poll_table_struct *); 1497 unsigned int (*poll) (struct file *, struct poll_table_struct *);
1494 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
1495 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 1498 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
1496 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 1499 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
1497 int (*mmap) (struct file *, struct vm_area_struct *); 1500 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -1561,8 +1564,8 @@ struct super_operations {
1561 1564
1562 void (*dirty_inode) (struct inode *); 1565 void (*dirty_inode) (struct inode *);
1563 int (*write_inode) (struct inode *, struct writeback_control *wbc); 1566 int (*write_inode) (struct inode *, struct writeback_control *wbc);
1564 void (*drop_inode) (struct inode *); 1567 int (*drop_inode) (struct inode *);
1565 void (*delete_inode) (struct inode *); 1568 void (*evict_inode) (struct inode *);
1566 void (*put_super) (struct super_block *); 1569 void (*put_super) (struct super_block *);
1567 void (*write_super) (struct super_block *); 1570 void (*write_super) (struct super_block *);
1568 int (*sync_fs)(struct super_block *sb, int wait); 1571 int (*sync_fs)(struct super_block *sb, int wait);
@@ -1570,7 +1573,6 @@ struct super_operations {
1570 int (*unfreeze_fs) (struct super_block *); 1573 int (*unfreeze_fs) (struct super_block *);
1571 int (*statfs) (struct dentry *, struct kstatfs *); 1574 int (*statfs) (struct dentry *, struct kstatfs *);
1572 int (*remount_fs) (struct super_block *, int *, char *); 1575 int (*remount_fs) (struct super_block *, int *, char *);
1573 void (*clear_inode) (struct inode *);
1574 void (*umount_begin) (struct super_block *); 1576 void (*umount_begin) (struct super_block *);
1575 1577
1576 int (*show_options)(struct seq_file *, struct vfsmount *); 1578 int (*show_options)(struct seq_file *, struct vfsmount *);
@@ -1615,8 +1617,8 @@ struct super_operations {
1615 * I_FREEING Set when inode is about to be freed but still has dirty 1617 * I_FREEING Set when inode is about to be freed but still has dirty
1616 * pages or buffers attached or the inode itself is still 1618 * pages or buffers attached or the inode itself is still
1617 * dirty. 1619 * dirty.
1618 * I_CLEAR Set by clear_inode(). In this state the inode is clean 1620 * I_CLEAR Added by end_writeback(). In this state the inode is clean
1619 * and can be destroyed. 1621 * and can be destroyed. Inode keeps I_FREEING.
1620 * 1622 *
1621 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are 1623 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are
1622 * prohibited for many purposes. iget() must wait for 1624 * prohibited for many purposes. iget() must wait for
@@ -1813,7 +1815,8 @@ extern struct vfsmount *collect_mounts(struct path *);
1813extern void drop_collected_mounts(struct vfsmount *); 1815extern void drop_collected_mounts(struct vfsmount *);
1814extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1816extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
1815 struct vfsmount *); 1817 struct vfsmount *);
1816extern int vfs_statfs(struct dentry *, struct kstatfs *); 1818extern int vfs_statfs(struct path *, struct kstatfs *);
1819extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
1817extern int freeze_super(struct super_block *super); 1820extern int freeze_super(struct super_block *super);
1818extern int thaw_super(struct super_block *super); 1821extern int thaw_super(struct super_block *super);
1819 1822
@@ -2163,9 +2166,8 @@ extern void iput(struct inode *);
2163extern struct inode * igrab(struct inode *); 2166extern struct inode * igrab(struct inode *);
2164extern ino_t iunique(struct super_block *, ino_t); 2167extern ino_t iunique(struct super_block *, ino_t);
2165extern int inode_needs_sync(struct inode *inode); 2168extern int inode_needs_sync(struct inode *inode);
2166extern void generic_delete_inode(struct inode *inode); 2169extern int generic_delete_inode(struct inode *inode);
2167extern void generic_drop_inode(struct inode *inode); 2170extern int generic_drop_inode(struct inode *inode);
2168extern int generic_detach_inode(struct inode *inode);
2169 2171
2170extern struct inode *ilookup5_nowait(struct super_block *sb, 2172extern struct inode *ilookup5_nowait(struct super_block *sb,
2171 unsigned long hashval, int (*test)(struct inode *, void *), 2173 unsigned long hashval, int (*test)(struct inode *, void *),
@@ -2182,7 +2184,7 @@ extern void unlock_new_inode(struct inode *);
2182 2184
2183extern void __iget(struct inode * inode); 2185extern void __iget(struct inode * inode);
2184extern void iget_failed(struct inode *); 2186extern void iget_failed(struct inode *);
2185extern void clear_inode(struct inode *); 2187extern void end_writeback(struct inode *);
2186extern void destroy_inode(struct inode *); 2188extern void destroy_inode(struct inode *);
2187extern void __destroy_inode(struct inode *); 2189extern void __destroy_inode(struct inode *);
2188extern struct inode *new_inode(struct super_block *); 2190extern struct inode *new_inode(struct super_block *);
@@ -2198,7 +2200,6 @@ static inline void insert_inode_hash(struct inode *inode) {
2198extern void file_move(struct file *f, struct list_head *list); 2200extern void file_move(struct file *f, struct list_head *list);
2199extern void file_kill(struct file *f); 2201extern void file_kill(struct file *f);
2200#ifdef CONFIG_BLOCK 2202#ifdef CONFIG_BLOCK
2201struct bio;
2202extern void submit_bio(int, struct bio *); 2203extern void submit_bio(int, struct bio *);
2203extern int bdev_read_only(struct block_device *); 2204extern int bdev_read_only(struct block_device *);
2204#endif 2205#endif
@@ -2265,19 +2266,8 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
2265#endif 2266#endif
2266 2267
2267#ifdef CONFIG_BLOCK 2268#ifdef CONFIG_BLOCK
2268struct bio;
2269typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, 2269typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
2270 loff_t file_offset); 2270 loff_t file_offset);
2271void dio_end_io(struct bio *bio, int error);
2272
2273ssize_t __blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, struct inode *inode,
2274 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2275 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2276 dio_submit_t submit_io, int lock_type);
2277ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2278 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2279 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2280 dio_submit_t submit_io, int lock_type);
2281 2271
2282enum { 2272enum {
2283 /* need locking between buffered and direct access */ 2273 /* need locking between buffered and direct access */
@@ -2287,24 +2277,13 @@ enum {
2287 DIO_SKIP_HOLES = 0x02, 2277 DIO_SKIP_HOLES = 0x02,
2288}; 2278};
2289 2279
2290static inline ssize_t blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, 2280void dio_end_io(struct bio *bio, int error);
2291 struct inode *inode, struct block_device *bdev, const struct iovec *iov, 2281
2292 loff_t offset, unsigned long nr_segs, get_block_t get_block, 2282ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2293 dio_iodone_t end_io) 2283 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2294{ 2284 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2295 return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, 2285 dio_submit_t submit_io, int flags);
2296 nr_segs, get_block, end_io, NULL,
2297 DIO_LOCKING | DIO_SKIP_HOLES);
2298}
2299 2286
2300static inline ssize_t blockdev_direct_IO_no_locking_newtrunc(int rw, struct kiocb *iocb,
2301 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2302 loff_t offset, unsigned long nr_segs, get_block_t get_block,
2303 dio_iodone_t end_io)
2304{
2305 return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset,
2306 nr_segs, get_block, end_io, NULL, 0);
2307}
2308static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, 2287static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2309 struct inode *inode, struct block_device *bdev, const struct iovec *iov, 2288 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2310 loff_t offset, unsigned long nr_segs, get_block_t get_block, 2289 loff_t offset, unsigned long nr_segs, get_block_t get_block,
@@ -2314,15 +2293,6 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2314 nr_segs, get_block, end_io, NULL, 2293 nr_segs, get_block, end_io, NULL,
2315 DIO_LOCKING | DIO_SKIP_HOLES); 2294 DIO_LOCKING | DIO_SKIP_HOLES);
2316} 2295}
2317
2318static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
2319 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2320 loff_t offset, unsigned long nr_segs, get_block_t get_block,
2321 dio_iodone_t end_io)
2322{
2323 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
2324 nr_segs, get_block, end_io, NULL, 0);
2325}
2326#endif 2296#endif
2327 2297
2328extern const struct file_operations generic_ro_fops; 2298extern const struct file_operations generic_ro_fops;
@@ -2349,10 +2319,10 @@ void inode_set_bytes(struct inode *inode, loff_t bytes);
2349 2319
2350extern int vfs_readdir(struct file *, filldir_t, void *); 2320extern int vfs_readdir(struct file *, filldir_t, void *);
2351 2321
2352extern int vfs_stat(char __user *, struct kstat *); 2322extern int vfs_stat(const char __user *, struct kstat *);
2353extern int vfs_lstat(char __user *, struct kstat *); 2323extern int vfs_lstat(const char __user *, struct kstat *);
2354extern int vfs_fstat(unsigned int, struct kstat *); 2324extern int vfs_fstat(unsigned int, struct kstat *);
2355extern int vfs_fstatat(int , char __user *, struct kstat *, int); 2325extern int vfs_fstatat(int , const char __user *, struct kstat *, int);
2356 2326
2357extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, 2327extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
2358 unsigned long arg); 2328 unsigned long arg);
@@ -2384,7 +2354,6 @@ extern int simple_link(struct dentry *, struct inode *, struct dentry *);
2384extern int simple_unlink(struct inode *, struct dentry *); 2354extern int simple_unlink(struct inode *, struct dentry *);
2385extern int simple_rmdir(struct inode *, struct dentry *); 2355extern int simple_rmdir(struct inode *, struct dentry *);
2386extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); 2356extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
2387extern int simple_setsize(struct inode *, loff_t);
2388extern int noop_fsync(struct file *, int); 2357extern int noop_fsync(struct file *, int);
2389extern int simple_empty(struct dentry *); 2358extern int simple_empty(struct dentry *);
2390extern int simple_readpage(struct file *file, struct page *page); 2359extern int simple_readpage(struct file *file, struct page *page);
@@ -2421,8 +2390,7 @@ extern int buffer_migrate_page(struct address_space *,
2421 2390
2422extern int inode_change_ok(const struct inode *, struct iattr *); 2391extern int inode_change_ok(const struct inode *, struct iattr *);
2423extern int inode_newsize_ok(const struct inode *, loff_t offset); 2392extern int inode_newsize_ok(const struct inode *, loff_t offset);
2424extern int __must_check inode_setattr(struct inode *, const struct iattr *); 2393extern void setattr_copy(struct inode *inode, const struct iattr *attr);
2425extern void generic_setattr(struct inode *inode, const struct iattr *attr);
2426 2394
2427extern void file_update_time(struct file *file); 2395extern void file_update_time(struct file *file);
2428 2396
@@ -2513,7 +2481,8 @@ int proc_nr_files(struct ctl_table *table, int write,
2513int __init get_filesystem_list(char *buf); 2481int __init get_filesystem_list(char *buf);
2514 2482
2515#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) 2483#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
2516#define OPEN_FMODE(flag) ((__force fmode_t)((flag + 1) & O_ACCMODE)) 2484#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
2485 (flag & FMODE_NONOTIFY)))
2517 2486
2518#endif /* __KERNEL__ */ 2487#endif /* __KERNEL__ */
2519#endif /* _LINUX_FS_H */ 2488#endif /* _LINUX_FS_H */