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.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 44f35aea2f1f..9682d52d1507 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -651,6 +651,7 @@ struct block_device {
651 int bd_openers; 651 int bd_openers;
652 struct mutex bd_mutex; /* open/close mutex */ 652 struct mutex bd_mutex; /* open/close mutex */
653 struct list_head bd_inodes; 653 struct list_head bd_inodes;
654 void * bd_claiming;
654 void * bd_holder; 655 void * bd_holder;
655 int bd_holders; 656 int bd_holders;
656#ifdef CONFIG_SYSFS 657#ifdef CONFIG_SYSFS
@@ -1280,10 +1281,12 @@ static inline int lock_may_write(struct inode *inode, loff_t start,
1280 1281
1281 1282
1282struct fasync_struct { 1283struct fasync_struct {
1283 int magic; 1284 spinlock_t fa_lock;
1284 int fa_fd; 1285 int magic;
1285 struct fasync_struct *fa_next; /* singly linked list */ 1286 int fa_fd;
1286 struct file *fa_file; 1287 struct fasync_struct *fa_next; /* singly linked list */
1288 struct file *fa_file;
1289 struct rcu_head fa_rcu;
1287}; 1290};
1288 1291
1289#define FASYNC_MAGIC 0x4601 1292#define FASYNC_MAGIC 0x4601
@@ -1292,8 +1295,6 @@ struct fasync_struct {
1292extern int fasync_helper(int, struct file *, int, struct fasync_struct **); 1295extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
1293/* can be called from interrupts */ 1296/* can be called from interrupts */
1294extern void kill_fasync(struct fasync_struct **, int, int); 1297extern void kill_fasync(struct fasync_struct **, int, int);
1295/* only for net: no internal synchronization */
1296extern void __kill_fasync(struct fasync_struct *, int, int);
1297 1298
1298extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); 1299extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
1299extern int f_setown(struct file *filp, unsigned long arg, int force); 1300extern int f_setown(struct file *filp, unsigned long arg, int force);
@@ -1314,8 +1315,6 @@ extern int send_sigurg(struct fown_struct *fown);
1314extern struct list_head super_blocks; 1315extern struct list_head super_blocks;
1315extern spinlock_t sb_lock; 1316extern spinlock_t sb_lock;
1316 1317
1317#define sb_entry(list) list_entry((list), struct super_block, s_list)
1318#define S_BIAS (1<<30)
1319struct super_block { 1318struct super_block {
1320 struct list_head s_list; /* Keep this first */ 1319 struct list_head s_list; /* Keep this first */
1321 dev_t s_dev; /* search index; _not_ kdev_t */ 1320 dev_t s_dev; /* search index; _not_ kdev_t */
@@ -1334,12 +1333,11 @@ struct super_block {
1334 struct rw_semaphore s_umount; 1333 struct rw_semaphore s_umount;
1335 struct mutex s_lock; 1334 struct mutex s_lock;
1336 int s_count; 1335 int s_count;
1337 int s_need_sync;
1338 atomic_t s_active; 1336 atomic_t s_active;
1339#ifdef CONFIG_SECURITY 1337#ifdef CONFIG_SECURITY
1340 void *s_security; 1338 void *s_security;
1341#endif 1339#endif
1342 struct xattr_handler **s_xattr; 1340 const struct xattr_handler **s_xattr;
1343 1341
1344 struct list_head s_inodes; /* all inodes */ 1342 struct list_head s_inodes; /* all inodes */
1345 struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ 1343 struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */
@@ -1431,7 +1429,8 @@ extern void dentry_unhash(struct dentry *dentry);
1431 * VFS file helper functions. 1429 * VFS file helper functions.
1432 */ 1430 */
1433extern int file_permission(struct file *, int); 1431extern int file_permission(struct file *, int);
1434 1432extern void inode_init_owner(struct inode *inode, const struct inode *dir,
1433 mode_t mode);
1435/* 1434/*
1436 * VFS FS_IOC_FIEMAP helper definitions. 1435 * VFS FS_IOC_FIEMAP helper definitions.
1437 */ 1436 */
@@ -1744,6 +1743,7 @@ struct file_system_type {
1744 1743
1745 struct lock_class_key s_lock_key; 1744 struct lock_class_key s_lock_key;
1746 struct lock_class_key s_umount_key; 1745 struct lock_class_key s_umount_key;
1746 struct lock_class_key s_vfs_rename_key;
1747 1747
1748 struct lock_class_key i_lock_key; 1748 struct lock_class_key i_lock_key;
1749 struct lock_class_key i_mutex_key; 1749 struct lock_class_key i_mutex_key;
@@ -1781,8 +1781,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
1781 const struct super_operations *ops, unsigned long, 1781 const struct super_operations *ops, unsigned long,
1782 struct vfsmount *mnt); 1782 struct vfsmount *mnt);
1783extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1783extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1784int __put_super_and_need_restart(struct super_block *sb);
1785void put_super(struct super_block *sb);
1786 1784
1787/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ 1785/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
1788#define fops_get(fops) \ 1786#define fops_get(fops) \
@@ -1802,6 +1800,8 @@ extern void drop_collected_mounts(struct vfsmount *);
1802extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1800extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
1803 struct vfsmount *); 1801 struct vfsmount *);
1804extern int vfs_statfs(struct dentry *, struct kstatfs *); 1802extern int vfs_statfs(struct dentry *, struct kstatfs *);
1803extern int freeze_super(struct super_block *super);
1804extern int thaw_super(struct super_block *super);
1805 1805
1806extern int current_umask(void); 1806extern int current_umask(void);
1807 1807
@@ -2087,9 +2087,9 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping,
2087extern int filemap_fdatawrite_range(struct address_space *mapping, 2087extern int filemap_fdatawrite_range(struct address_space *mapping,
2088 loff_t start, loff_t end); 2088 loff_t start, loff_t end);
2089 2089
2090extern int vfs_fsync_range(struct file *file, struct dentry *dentry, 2090extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
2091 loff_t start, loff_t end, int datasync); 2091 int datasync);
2092extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); 2092extern int vfs_fsync(struct file *file, int datasync);
2093extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); 2093extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
2094extern void sync_supers(void); 2094extern void sync_supers(void);
2095extern void emergency_sync(void); 2095extern void emergency_sync(void);
@@ -2228,6 +2228,7 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
2228 2228
2229extern void 2229extern void
2230file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); 2230file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
2231extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);
2231extern loff_t no_llseek(struct file *file, loff_t offset, int origin); 2232extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
2232extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); 2233extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
2233extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset, 2234extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset,
@@ -2329,6 +2330,7 @@ extern struct super_block *get_super(struct block_device *);
2329extern struct super_block *get_active_super(struct block_device *bdev); 2330extern struct super_block *get_active_super(struct block_device *bdev);
2330extern struct super_block *user_get_super(dev_t); 2331extern struct super_block *user_get_super(dev_t);
2331extern void drop_super(struct super_block *sb); 2332extern void drop_super(struct super_block *sb);
2333extern void iterate_supers(void (*)(struct super_block *, void *), void *);
2332 2334
2333extern int dcache_dir_open(struct inode *, struct file *); 2335extern int dcache_dir_open(struct inode *, struct file *);
2334extern int dcache_dir_close(struct inode *, struct file *); 2336extern int dcache_dir_close(struct inode *, struct file *);
@@ -2362,6 +2364,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count);
2362 2364
2363extern ssize_t simple_read_from_buffer(void __user *to, size_t count, 2365extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
2364 loff_t *ppos, const void *from, size_t available); 2366 loff_t *ppos, const void *from, size_t available);
2367extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
2368 const void __user *from, size_t count);
2365 2369
2366extern int simple_fsync(struct file *, struct dentry *, int); 2370extern int simple_fsync(struct file *, struct dentry *, int);
2367 2371