diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5dc0fa288a4c..404d391f3d35 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -197,6 +197,10 @@ extern int dir_notify_enable; | |||
197 | #define BLKBSZGET _IOR(0x12,112,size_t) | 197 | #define BLKBSZGET _IOR(0x12,112,size_t) |
198 | #define BLKBSZSET _IOW(0x12,113,size_t) | 198 | #define BLKBSZSET _IOW(0x12,113,size_t) |
199 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ | 199 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ |
200 | #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) | ||
201 | #define BLKTRACESTART _IO(0x12,116) | ||
202 | #define BLKTRACESTOP _IO(0x12,117) | ||
203 | #define BLKTRACETEARDOWN _IO(0x12,118) | ||
200 | 204 | ||
201 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ | 205 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ |
202 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 206 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
@@ -397,8 +401,8 @@ struct block_device { | |||
397 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 401 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
398 | struct inode * bd_inode; /* will die */ | 402 | struct inode * bd_inode; /* will die */ |
399 | int bd_openers; | 403 | int bd_openers; |
400 | struct semaphore bd_sem; /* open/close mutex */ | 404 | struct mutex bd_mutex; /* open/close mutex */ |
401 | struct semaphore bd_mount_sem; /* mount mutex */ | 405 | struct mutex bd_mount_mutex; /* mount mutex */ |
402 | struct list_head bd_inodes; | 406 | struct list_head bd_inodes; |
403 | void * bd_holder; | 407 | void * bd_holder; |
404 | int bd_holders; | 408 | int bd_holders; |
@@ -509,7 +513,7 @@ struct inode { | |||
509 | 513 | ||
510 | #ifdef CONFIG_INOTIFY | 514 | #ifdef CONFIG_INOTIFY |
511 | struct list_head inotify_watches; /* watches on this inode */ | 515 | struct list_head inotify_watches; /* watches on this inode */ |
512 | struct semaphore inotify_sem; /* protects the watches list */ | 516 | struct mutex inotify_mutex; /* protects the watches list */ |
513 | #endif | 517 | #endif |
514 | 518 | ||
515 | unsigned long i_state; | 519 | unsigned long i_state; |
@@ -843,7 +847,7 @@ struct super_block { | |||
843 | * The next field is for VFS *only*. No filesystems have any business | 847 | * The next field is for VFS *only*. No filesystems have any business |
844 | * even looking at it. You had been warned. | 848 | * even looking at it. You had been warned. |
845 | */ | 849 | */ |
846 | struct semaphore s_vfs_rename_sem; /* Kludge */ | 850 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
847 | 851 | ||
848 | /* Granuality of c/m/atime in ns. | 852 | /* Granuality of c/m/atime in ns. |
849 | Cannot be worse than a second */ | 853 | Cannot be worse than a second */ |
@@ -1112,6 +1116,18 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1112 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1116 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1113 | } | 1117 | } |
1114 | 1118 | ||
1119 | static inline void inode_inc_link_count(struct inode *inode) | ||
1120 | { | ||
1121 | inode->i_nlink++; | ||
1122 | mark_inode_dirty(inode); | ||
1123 | } | ||
1124 | |||
1125 | static inline void inode_dec_link_count(struct inode *inode) | ||
1126 | { | ||
1127 | inode->i_nlink--; | ||
1128 | mark_inode_dirty(inode); | ||
1129 | } | ||
1130 | |||
1115 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | 1131 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); |
1116 | static inline void file_accessed(struct file *file) | 1132 | static inline void file_accessed(struct file *file) |
1117 | { | 1133 | { |
@@ -1531,7 +1547,7 @@ extern void destroy_inode(struct inode *); | |||
1531 | extern struct inode *new_inode(struct super_block *); | 1547 | extern struct inode *new_inode(struct super_block *); |
1532 | extern int remove_suid(struct dentry *); | 1548 | extern int remove_suid(struct dentry *); |
1533 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | 1549 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); |
1534 | extern struct semaphore iprune_sem; | 1550 | extern struct mutex iprune_mutex; |
1535 | 1551 | ||
1536 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1552 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1537 | extern void remove_inode_hash(struct inode *); | 1553 | extern void remove_inode_hash(struct inode *); |